The Treasury Department on Wednesday announced plans to sell 30 million shares of General Motors Co common stock as part of its ongoing effort to wind down the government's stake in the bailed-out automaker.

The Treasury said it would sell the shares in a public offering in conjunction with the company's inclusion to the Standard & Poor's 500 index on June 6, which should help spur demand for the stock.

The offering will take place along with the sale of 20 million shares of GM stock held by the UAW Retiree Medical Benefits Trust, bringing the total size of the sale to 50 million shares, it said.

The government, which initially took a 60.8 percent stake in the No. 1 U.S. automaker as part of its $49.5 billion bailout, had said it planned to sell its remaining shares by early 2014. Some analysts said it could unwind the position even sooner.

Joseph Spak, an analyst with RBC Capital Markets, said a quicker exit could "open the door for additional capital actions including a potential dividend."

The government looks certain to end up billions of dollars in the hole on the cost of the bailout. Treasury officials have said the goal was not to turn a profit but to save U.S. jobs.

GM shares on Wednesday opened down slightly at $34.90. At that price, the Treasury's sale would net $1.05 billion. The government would still hold 211.7 million shares after the public offering is completed, which would be valued at around $7.39 billion.

However, the Treasury has recovered only $31.7 billion in bailout funds so far, with $17.7 billion still outstanding.

Citigroup Inc., JPMorgan Chase & Co. and Morgan Stanley are acting as the joint book-running managers of the proposed offering, the Treasury said.

GM will rejoin the S&P 500 index on Thursday after the close of trading. This is seen as a milestone since the company filed for bankruptcy reorganization in 2009. As a result, GM was kicked out of the S&P 500 slot.

The automaker's return to the S&P 500 is expected to prompt stronger demand for its stock. Companies often benefit from a bump up in stock price when they are added to the S&P, in part because some funds that track the index need to hold the stock.

"We appreciate the opportunity to assist in this offering made possible by our rejoining the S&P 500," said Dan Ammann, GM Chief Financial Officer. "Our focus remains on continuing the progress we are making in the marketplace with world-class cars, trucks and crossovers."

The revenue the Treasury will receive from the stock sale will help the government remain below the nation's $16.7 trillion statutory debt limit, potentially buying the Obama administration and lawmakers more time to strike a deal to raise the debt cap and avoid a default.

(Reporting by Margaret Chadbourn in Washington; additional reporting by Ben Klayman in Detroit; Editing by W Simon, James Dalgleish and Chris Reese)