Citigroup said on Monday that it had reached a deal with U.S. regulators to repay $20 billion of shares held by the government by issuing $17 billion of stock and allowing it to exit the TARP program in 2010.

The deal appeared to allow Citi to shed the executive pay restrictions that came with the taxpayer assistance that has kept it in business.

As part of the deal, the U.S. Treasury will sell up to $5 billion of stock it holds in Citi in a secondary offering, allowing the company to exit the TARP program in 2010. The bank said it would have paid $3.1 billion in dividends and interest to the U.S. government.

We owe the American taxpayers a debt of gratitude and recognize our obligation to support the economic recovery through lending and assistance to homeowners and other borrowers in need, Chief Executive Officer Vikram Pandit said in a statement.

Pandit was scheduled to meet President Barack Obama later on Monday, along with the chiefs of Goldman Sachs JPMorgan Chase & Co and other top-tier banks. The President is expected to call on the bankers to take responsibility for helping the economy after benefiting from taxpayer-funded bailouts of the financial sector.

With the repayment, and the termination of its loss-sharing agreement with the U.S. government, Citi will longer be deemed a beneficiary of exceptional financial assistance under TARP, the bank said.

The total capital-raising plan would include an over-allotment option of $2.55 billion and $3.5 billion of tangible equity units. These are to be made up of about $2.8 billion of prepaid common stock purchase contracts and roughly $700 million of subordinated debt.

The company also said it might issue up to $3 billion of trust preferred securities in the first quarter of 2010.

Citi borrowed $45 billion last year under TARP. This year, the government agreed to convert $25 billion of those funds into Citigroup common stock, leaving the United States with a roughly 34 percent stake in the bank.

Bank of America Corp , the largest U.S. bank, finished repaying the $45 billion it had borrowed under TARP last week using a mix of cash from its corporate coffers and money raised as part of a $19.29 billion securities offering.

Citigroup shares were down 1 cent at $3.94 in trading before the market opened.

(Reporting by Christopher Kaufman; Editing by Lisa Von Ahn)