General Motors Co has bought back the government's holdings of GM preferred stock issued in the automaker's bailout for $2.1 billion, the U.S. Treasury Department said on Wednesday.

Completion of the repurchase brings GM's total repayments to U.S. taxpayers to $23.1 billion, including $13.5 billion received from the automaker's initial public offering last month, the Treasury said. It also counts $6.7 billion in GM debt repayments and $800 million from interest and dividends.

The government has invested about $49.5 billion in GM, which was steered through a government-sponsored bankruptcy in 2009.

The GM Series A preferred stock buyback was agreed in October at a price of $25.50 a share. GM has said it expects to record a $700 million charge against fourth-quarter net income for the difference between the purchase price and the recorded value of the preferred shares.

The transaction reduces the Treasury's holdings in GM to about 500 million shares of common stock, or around a 33 percent stake following the IPO.

At GM's market price of $33.75 a share on Wednesday afternoon, that stake would be worth about $16.88 billion.

To break even on the bailout, however, the Treasury would have to sell its remaining GM shares at nearly $53 each, a massive increase from current levels and one that will likely require a much healthier economy and stronger GM sales and profits.

The Treasury did not change its $50 billion estimate for the total final cost of the $700 billion Troubled Asset Relief Program. Coupled with gains from other interests in bailed-out insurer American International Group the net government cost is expected to be about $30 billion.

The Treasury said it has disbursed $389 billion from TARP and has received back $266.5 billion from repayments, sales of shares and warrants, interest and dividends.

(Reporting by David Lawder in Washington; Additional reporting by David Bailey in Detroit; Editing by James Dalgleish)