Citigroup today announced it will raise $20.5 billion in capital, mostly in common stock, after reaching an agreement with the U.S. to pay back a $20 billion bailout investment.

The company says it will sell $20.5 billion of capital and debt in the form of $17 billion of common stock and $3.5 billion of tangible equity units.

Citigroup said that as of December 31, the bank will have paid $3.1 billion in interest and dividends to the government.

The government created a Troubled Assets Relief Program for financial companies last year that bought preferred stock in major U.S. banks amid the peak of the financial crisis. Citigroup is among the last of the largest U.S. banks to reach an agreement with the U.S. to be allowed to repay the government's investment.

The TARP program was designed to provide assistance until banks were in a position to repay it prudently, Citigroup Chief Executive Officer Vikram Pandit said in a released statement Monday.

Pandit said the company was thankful to taxpayers and would support the economy by lending and assistance to homeowners and borrowers in need.

The company says it will sell $20.5 billion of capital and debt in the form of $17 billion of common stock and $3.5 billion of tangible equity units.