General Motors Co said it will buy back 200 million of its shares from the U.S. Treasury and the government plans to sell its remaining stake within 15 months, all but assuring a multibillion dollar loss.

GM Chief Financial Officer Dan Ammann said on Wednesday the automaker will pay $5.5 billion, or $27.50 a share, for the Treasury-held shares in a deal expected to close by year-end. That represents a 7.9 percent premium on Tuesday's closing price.

GM shares rose 8.2 percent to $27.58 on Wednesday.

Treasury said it will sell its remaining stake of about 300.1 million shares "through various means in an orderly fashion", and could begin the process as soon as January.

The auto giant, dubbed "Government Motors," received about $50 billion from the Treasury as part of its bankruptcy restructuring in 2009 under the Troubled Asset Relief Program (TARP).

The stock sale is part of a broader push to wind down the controversial financial bailout, created by U.S. President Barack Obama's predecessor, George W. Bush, to prevent the collapse of the U.S. banking industry during the 2007-2009 financial crisis.

On Tuesday, Treasury said it would largely sell its remaining shares in bailed-out banks over the coming 12 months to 15 months. Last week it sold the last of its common stock in American International Group Inc at a profit.

Obama heavily promoted his decision to use public funds to rescue the auto industry and save jobs as he campaigned for re-election in swing states like Michigan and Ohio. Voters in both states backed him again in the November 6 election, providing critical support in his victory.

POTENTIAL LOSS

The GM sale will raise the proceeds that Treasury has recovered to $28.6 billion. With $20.9 billion left from the original bailout, the government would have to sell its remaining shares at an average price of $69.72 to break even.

If Treasury sold its remaining stock at the price GM is paying now, it would come up short by more than $12 billion.

TARP was approved by Congress as a $700 billion program, though Treasury eventually disbursed $418 billion. On Wednesday it said it had recovered $381 billion to date, or about 90 percent.

"TARP was always meant to be a temporary, emergency program. The government should not be in the business of owning stakes in private companies for an indefinite period of time," Treasury Assistant Secretary Timothy Massad said in a statement.

"Moving to exit our investment in GM within the next 12 to 15 months is consistent with our dual goals of winding down TARP as soon as practicable and protecting taxpayer interests."

After the buyback, Treasury will still own a stake of about 19 percent, down from about 26 percent currently. Ammann said GM will not buy more shares directly from Treasury after this buyback is completed.

Ammann said the move and resulting Treasury plans will remove an "overhang" on the stock that has hurt sales and bring an "element of closure" to the bailout.

GM will end the year with estimated liquidity of about $38 billion, even after the deal, he said. That will add to earnings per share by reducing the number of outstanding shares by about 11 percent.

GM will take a charge of about $400 million in the fourth quarter tied to the buyback.

In addition, Treasury has agreed to relinquish certain governance rights, including required levels of U.S. manufacturing and barring the purchase of corporate jets, Ammann said. Senior executive payment caps under TARP remain in place.

(Additional reporting by Alister Bull; Editing by Gerald E. McCormick, Jeffrey Benkoe and Tim Ahmann)