Citigroup Inc. said Monday it is repaying $20 billion in bailout money it received from the Treasury Department, freeing the banking giant from the close scrutiny and pay restrictions that came with the rescue program. The government will also sell its stake in the company.

The New York-based bank was among the hardest hit by the credit crisis and rising loan defaults and got one of the largest bailouts of any banks during the financial crisis. The government gave it $45 billion in loans and agreed to protect losses on nearly $300 billion in risky investments. Wells Fargo & Co. remains the last national bank that has yet to pay back its bailout money.

Citi is selling $20.5 billion in stock and debt to repay the government. It only has to pay back $20 billion because the remaining $25 billion was converted into a 34 percent ownership stake in the bank earlier this year. The government plans to sell that entire stake — which has risen in value by more than 20 percent — during the next year. The loss-sharing agreement will also end as part of the plan.

The Treasury Department is in line to earn about $13 billion in profit on its support for Citigroup depending on how much it makes selling the stock, said a Treasury official, who spoke on condition of anonymity in advance of President Barack Obama's meeting with bank officials.

After repaying the funds, Citi will no longer be subject to pay restrictions and other conditions of the bailout program. However, the repayment comes at a heavy cost. Raising the new capital will significantly dilute current shareholders' stake in the company.

Citi's shares fell 25 cents, or 6.3 percent, to $3.70 in morning trading Monday.

By approving the repayment, the government is essentially saying Citi is on strong enough financial footing to stand on its own. It's a far cry from concerns at the beginning of the year when some analysts were saying Citi could fail completely and be taken over by the government.

While the government believes in the strength of Citi, the bank is still facing losses and trying to streamline operations to maintain profitability that has been tenuous throughout the year, even as other big banks recovered.

The repayment by Citi comes as top executives from some of the nation's biggest banks meet Monday with Obama. The president is asking the executives to back his efforts to tighten financial regulations, designed to rein in the risky behavior that led to the credit crisis. Obama could face difficulty though, after describing bankers as "fat cats" in a "60 Minutes" interview broadcast Sunday.

Citigroup received the bailout as part of the Troubled Asset Relief Program. The program was launched late last year to help ailing banks manage through the peak of the credit crisis.

Nearly 700 banks of all sizes participated in the program. Most of the largest banks, like JPMorgan Chase & Co. and Goldman Sachs Group Inc., quickly paid back the money they received because it carried restrictions such as caps on executive pay and dividends.

Many banks have bristled at strict government oversight.

Citi's announcement comes just days after Bank of America Corp. completed the repayment of $45 billion it received as part of TARP.

San Francisco-based Wells Fargo is now the last large national bank that hasn't paid back the government. It received $25 billion. Like Citi, Wells Fargo was one of the initial eight banks to participate in TARP.

TARP recipients have so far paid back $116 billion. That's out of a total of $453 billion that the government extended to banks, insurers, automakers and other companies under the program.

While the TARP repayment reduces the tight scrutiny of regulators, it also now leaves the bank more exposed to potential losses. The end of the loss-sharing agreement on about $300 billion of risky investments could hinder Citigroup's continuing efforts to maintain profitability.

The Treasury official said Citigroup never had to tap the loss-sharing agreement, and the government has taken no losses on the Citi investment.

Citigroup has been among the hardest hit banks by the credit crisis and continues to see consumer loan defaults pile up. Loan losses cost the bank $8 billion during the third quarter.

It is widely expected consumers will continue to miss payments at rapid rates in 2010 because the job market remains weak and wages are not going up. Loan defaults are likely to remain high industrywide.

Citigroup reported a $101 million profit during the third quarter before accounting for $288 million in preferred stock dividends and the debt exchange offer that gave the government its stake in the bank. Including those costs, Citi lost $3.24 billion during the quarter ended Sept. 30.

Paying back TARP money will cut dividend costs by about $1.7 billion annually, the bank said. Citi will take an $8 billion pretax loss to pay back the bailout money.

Citi is issuing $20.5 billion in capital and debt to help repay its obligations, including the $17 billion of common stock. Investors will have the option to buy an extra $2.55 billion in stock to cover any over-allotments.

The bank also said it will award $1.7 billion in stock equivalents to employees instead of cash they would have ordinarily received as part of their compensation. Under the TARP restrictions cash payments for executives were restricted. Citi had said in recent months it was revising the mix of cash and stock in its compensation packages to meet the requirements. Those restrictions would be lifted after repaying TARP money.

The government is selling the first $5 billion of common stock it holds in the bank at the same time the bank sells the $17 billion in stock. The remainder of the government's stake will be sold "in an orderly fashion" over the next six to 12 months, Citi said in a statement.

The government stands to earn about $5.7 billion in profit by selling its portion of Citi shares, based on Friday's closing price of $3.95.

Citi had 22.86 billion shares outstanding as of Sept. 30. Based on Friday's closing price, Citi would need to sell about 4.3 billion shares to raise $17 billion. That would dilute current shareholders stake in the company by about 19 percent.