Rushing to rescue Citigroup, the US government agreed to shoulder hundreds of billions of possible losses at the stricken bank and to plow a fresh $20 billion into the company. The action, announced late Sunday by the Treasury Department, the Federal Reserve and the Federal Deposit Insurance Corp., is aimed at shoring up a huge financial institution whose collapse would wreak havoc on the already fragile financial system and the US economy. “With these transactions, the US government is taking the actions necessary to strengthen the financial system and protect US taxpayers and the US economy,” the three agencies said in a joint statement. “We will continue to use all of our resources to preserve the strength of our banking institutions, and promote the process of repair and recovery and to manage risks.” The Citigroup rescue came after a weekend of marathon discussions led by Treasury Secretary Henry Paulson and Fed Chairman Ben Bernanke. Timothy Geithner, president of the Federal Reserve Bank of New York, who is being tapped by President-elect Barack Obama as his Treasury chief also participated. Vikram S. Pandit, Citi's chief executive officer, welcomed the action. “We appreciate the tremendous effort by the government to assure market stability,” he said in a statement issued early Monday. The $20 billion cash injection by the Treasury Department will come from the $700 billion financial bailout package. The capital infusion follows an earlier one – of $25 billion – in Citigroup in which the government also received an ownership stake. As part of the plan, Treasury and the FDIC will guarantee against the “possibility of unusually large losses” on up to $306 billion of risky loans and securities backed by commercial and residential mortgages. Under the loss-sharing arrangement, Citigroup Inc. will assume the first $29 billion in losses on the risky pool of assets. Beyond that amount, the government would absorb 90 percent of the remaining losses, and Citigroup 10 percent. Money from the $700 billion bailout and funds from the FDIC would cover the government's portion of potential losses. The Federal Reserve would finance the remaining assets with a loan to Citigroup. In exchange for the guarantees, the government will get $7 billion in preferred shares of Citigroup. As a condition of the rescue, Citigroup is barred from paying quarterly dividends to shareholders of more than 1 cent a share for three years unless the company obtains consent from the three federal agencies. The bank is currently paying a dividend of 16 cents, halved from a 32-cent payout in the previous quarter. The agreement also places restrictions on executive compensation, including bonuses. Importantly, the agreement calls on Citigroup to take steps to help distressed homeowners. Specifically, Citigroup will modify mortgages to help people avoid foreclosure along the lines of an FDIC plan that was put into effect at IndyMac Bank, a major failed savings and loan based in Pasadena, Calif. Citigroup has seen its shares lose 60 percent of their value in the past week, reflecting a crisis of confidence among skittish investors. They are worried all the risky debt on Citigroup's balance sheet will turn into losses as the economy worsens and the markets stay turbulent – losses that could be nearly impossible to reverse. Citigroup is such a large, interconnected player in the financial system that it is seen by Washington policymakers as too big to fail. The company has operations stretching around the globe in more than 100 countries. Analysts consider Citigroup the most vulnerable among the major US banks. Citigroup was especially hard hit by the meltdown in risky, subprime mortgages made to people with tarnished credit or low incomes.