Citigroup Inc. (C) and Bank of America Corp. (BAC) were the reigning champions of finance in 2006 as home prices peaked, leading the 10 biggest U.S. banks and brokerage firms to their best year ever with $104 billion of profits.

By 2008, the housing market’s collapse forced those companies to take more than six times as much, $669 billion, in emergency loans from the U.S. Federal Reserve. The loans dwarfed the $160 billion in public bailouts the top 10 got from the U.S. Treasury, yet until now the full amounts have remained secret.

Fed Chairman Ben S. Bernanke’s unprecedented effort to keep the economy from plunging into depression included lending banks and other companies as much as $1.2 trillion of public money, about the same amount U.S. homeowners currently owe on 6.5 million delinquent and foreclosed mortgages. The largest borrower, Morgan Stanley (MS), got as much as $107.3 billion, while Citigroup took $99.5 billion and Bank of America $91.4 billion, according to a Bloomberg News compilation of data obtained through Freedom of Information Act requests, months of litigation and an act of Congress.

“These are all whopping numbers,” said Robert Litan, a former Justice Department official who in the 1990s served on a commission probing the causes of the savings and loan crisis. “You’re talking about the aristocracy of American finance going down the tubes without the federal money.”

Foreign Borrowers

It wasn’t just American finance. Almost half of the Fed’s top 30 borrowers, measured by peak balances, were European firms. They included Edinburgh-based Royal Bank of Scotland Plc, which took $84.5 billion, the most of any non-U.S. lender, and Zurich-based UBS AG (UBSN), which got $77.2 billion. Germany’s Hypo Real Estate Holding AG borrowed $28.7 billion, an average of $21 million for each of its 1,366 employees.

The largest borrowers also included Dexia SA (DEXB), Belgium’s biggest bank by assets, and Societe Generale SA, based in Paris, whose bond-insurance prices have surged in the past month as investors speculated that the spreading sovereign debt crisis in Europe might increase their chances of default.

The $1.2 trillion peak on Dec. 5, 2008 — the combined outstanding balance under the seven programs tallied by Bloomberg — was almost three times the size of the U.S. federal budget deficit that year and more than the total earnings of all federally insured banks in the U.S. for the decade through 2010, according to data compiled by Bloomberg.

Peak Balance

The balance was more than 25 times the Fed’s pre-crisis lending peak of $46 billion on Sept. 12, 2001, the day after terrorists attacked the World Trade Center in New York and the Pentagon. Denominated in $1 bills, the $1.2 trillion would fill 539 Olympic-size swimming pools.

The Fed has said it had “no credit losses” on any of the emergency programs, and a report by Federal Reserve Bank of New York staffers in February said the central bank netted $13 billion in interest and fee income from the programs from August 2007 through December 2009.

“We designed our broad-based emergency programs to both effectively stem the crisis and minimize the financial risks to the U.S. taxpayer,” said James Clouse, deputy director of the Fed’s division of monetary affairs in Washington. “Nearly all of our emergency-lending programs have been closed. We have incurred no losses and expect no losses.”

While the 18-month U.S. recession that ended in June 2009 after a 5.1 percent contraction in gross domestic product was nowhere near the four-year, 27 percent decline between August 1929 and March 1933, banks and the economy remain stressed.

Odds of Recession

The odds of another recession have climbed during the past six months, according to five of nine economists on the Business Cycle Dating Committee of the National Bureau of Economic Research, an academic panel that dates recessions.

Bank of America’s bond-insurance prices last week surged to a rate of $342,040 a year for coverage on $10 million of debt, above whereLehman Brothers Holdings Inc. (LEHMQ)’s bond insurance was priced at the start of the week before the firm collapsed. Citigroup’s shares are trading below the split-adjusted price of $28 that they hit on the day the bank’s Fed loans peaked in January 2009. The U.S. unemployment rate was at 9.1 percent in July, compared with 4.7 percent in November 2007, before the recession began.

Homeowners are more than 30 days past due on their mortgage payments on 4.38 million properties in the U.S., and 2.16 million more properties are in foreclosure, representing a combined $1.27 trillion of unpaid principal, estimates Jacksonville, Florida-based Lender Processing Services Inc.

Liquidity Requirements

“Why in hell does the Federal Reserve seem to be able to find the way to help these entities that are gigantic?” U.S. Representative Walter B. Jones, a Republican from North Carolina, said at a June 1 congressional hearing in Washington on Fed lending disclosure. “They get help when the average businessperson down in eastern North Carolina, and probably across America, they can’t even go to a bank they’ve been banking with for 15 or 20 years and get a loan.”

The sheer size of the Fed loans bolsters the case for minimum liquidity requirements that global regulators last year agreed to impose on banks for the first time, said Litan, now a vice president at the Kansas City, Missouri-based Kauffman Foundation, which supports entrepreneurship research. Liquidity refers to the daily funds a bank needs to operate, including cash to cover depositor withdrawals.

The rules, which mandate that banks keep enough cash and easily liquidated assets on hand to survive a 30-day crisis, don’t take effect until 2015. Another proposed requirement for lenders to keep “stable funding” for a one-year horizon was postponed until at least 2018 after banks showed they’d have to raise as much as $6 trillion in new long-term debt to comply.

Reforms undertaken since the crisis might not insulate U.S. markets and financial institutions from the sovereign budget and debt crises facing Greece, Ireland and Portugal, according to the U.S. Financial Stability Oversight Council, a 10-member body created by the Dodd-Frank Act and led by Treasury Secretary Timothy Geithner.

“The recent financial crisis provides a stark illustration of how quickly confidence can erode and financial contagion can spread,” the council said in its July 26 report.

21,000 Transactions

Any new rescues by the U.S. central bank would be governed by transparency laws adopted in 2010 that require the Fed to disclose borrowers after two years.

Fed officials argued for more than two years that releasing the identities of borrowers and the terms of their loans would stigmatize banks, damaging stock prices or leading to depositor runs. A group of the biggest commercial banks last year asked the U.S. Supreme Court to keep at least some Fed borrowings secret. In March, the high court declined to hear that appeal, and the central bank made an unprecedented release of records.

Data gleaned from 29,346 pages of documents obtained under the Freedom of Information Act and from other Fed databases of more than 21,000 transactions make clear for the first time how deeply the world’s largest banks depended on the U.S. central bank to stave off cash shortfalls. Even as the firms asserted in news releases or earnings calls that they had ample cash, they drew Fed funding in secret, avoiding the stigma of weakness.

Morgan Stanley Borrowing

Two weeks after Lehman’s bankruptcy in September 2008, Morgan Stanley countered concerns that it might be next to go by announcing it had “strong capital and liquidity positions.” The statement, in a Sept. 29, 2008, press release about a $9 billion investment from Tokyo-based Mitsubishi UFJ Financial Group Inc., said nothing about Morgan Stanley’s Fed loans.

That was the same day as the firm’s $107.3 billion peak in borrowing from the central bank, which was the source of almost all of Morgan Stanley’s available cash, according to the lending data and documents released more than two years later by the Financial Crisis Inquiry Commission. The amount was almost three times the company’s total profits over the past decade, data compiled by Bloomberg show.

Mark Lake, a spokesman for New York-based Morgan Stanley, said the crisis caused the industry to “fundamentally re- evaluate” the way it manages its cash.

“We have taken the lessons we learned from that period and applied them to our liquidity-management program to protect both our franchise and our clients going forward,” Lake said. He declined to say what changes the bank had made.

Acceptable Collateral

In most cases, the Fed demanded collateral for its loans — Treasuries or corporate bonds and mortgage bonds that could be seized and sold if the money wasn’t repaid. That meant the central bank’s main risk was that collateral pledged by banks that collapsed would be worth less than the amount borrowed.

As the crisis deepened, the Fed relaxed its standards for acceptable collateral. Typically, the central bank accepts only bonds with the highest credit grades, such as U.S. Treasuries. By late 2008, it was accepting “junk” bonds, those rated below investment grade. It even took stocks, which are first to get wiped out in a liquidation.

Morgan Stanley borrowed $61.3 billion from one Fed program in September 2008, pledging a total of $66.5 billion of collateral, according to Fed documents. Securities pledged included $21.5 billion of stocks, $6.68 billion of bonds with a junk credit rating and $19.5 billion of assets with an “unknown rating,” according to the documents. About 25 percent of the collateral was foreign-denominated.

‘Willingness to Lend’

“What you’re looking at is a willingness to lend against just about anything,” said Robert Eisenbeis, a former research director at the Federal Reserve Bank of Atlanta and now chief monetary economist in Atlanta for Sarasota, Florida-based Cumberland Advisors Inc.

The lack of private-market alternatives for lending shows how skeptical trading partners and depositors were about the value of the banks’ capital and collateral, Eisenbeis said.

“The markets were just plain shut,” said Tanya Azarchs, former head of bank research at Standard & Poor’s and now an independent consultant in Briarcliff Manor, New York. “If you needed liquidity, there was only one place to go.”

Even banks that survived the crisis without government capital injections tapped the Fed through programs that promised confidentiality. London-based Barclays Plc (BARC) borrowed $64.9 billion and Frankfurt-based Deutsche Bank AG (DBK) got $66 billion. Sarah MacDonald, a spokeswoman for Barclays, and John Gallagher, a spokesman for Deutsche Bank, declined to comment.

Below-Market Rates

While the Fed’s last-resort lending programs generally charge above-market interest rates to deter routine borrowing, that practice sometimes flipped during the crisis. On Oct. 20, 2008, for example, the central bank agreed to make $113.3 billion of 28-day loans through itsTerm Auction Facility at a rate of 1.1 percent, according to a press release at the time.

The rate was less than a third of the 3.8 percent that banks were charging each other to make one-month loans on that day. Bank of America and Wachovia Corp. each got $15 billion of the 1.1 percent TAF loans, followed by Royal Bank of Scotland’s RBS Citizens NA unit with $10 billion, Fed data show.

JPMorgan Chase & Co. (JPM), the New York-based lender that touted its “fortress balance sheet” at least 16 times in press releases and conference calls from October 2007 through February 2010, took as much as $48 billion in February 2009 from TAF. The facility, set up in December 2007, was a temporary alternative to the discount window, the central bank’s 97-year-old primary lending program to help banks in a cash squeeze.

‘Larger Than TARP’

Goldman Sachs Group Inc. (GS), which in 2007 was the most profitable securities firm in Wall Street history, borrowed $69 billion from the Fed on Dec. 31, 2008. Among the programs New York-based Goldman Sachs tapped after the Lehman bankruptcy was the Primary Dealer Credit Facility, or PDCF, designed to lend money to brokerage firms ineligible for the Fed’s bank-lending programs.

Michael Duvally, a spokesman for Goldman Sachs, declined to comment.

The Fed’s liquidity lifelines may increase the chances that banks engage in excessive risk-taking with borrowed money, Rogoff said. Such a phenomenon, known as moral hazard, occurs if banks assume the Fed will be there when they need it, he said. The size of bank borrowings “certainly shows the Fed bailout was in many ways much larger than TARP,” Rogoff said.

TARP is the Treasury Department’s Troubled Asset Relief Program, a $700 billion bank-bailout fund that provided capital injections of $45 billion each to Citigroup and Bank of America, and $10 billion to Morgan Stanley. Because most of the Treasury’s investments were made in the form of preferred stock, they were considered riskier than the Fed’s loans, a type of senior debt.

Dodd-Frank Requirement

In December, in response to the Dodd-Frank Act, the Fed released 18 databases detailing its temporary emergency-lending programs.

Congress required the disclosure after the Fed rejected requests in 2008 from the late Bloomberg News reporter Mark Pittman and other media companies that sought details of its loans under the Freedom of Information Act. After fighting to keep the data secret, the central bank released unprecedented information about its discount window and other programs under court order in March 2011.

Bloomberg News combined Fed databases made available in December and July with the discount-window records released in March to produce daily totals for banks across all the programs, including the Asset-Backed Commercial Paper Money Market Mutual Fund Liquidity Facility, Commercial Paper Funding Facility, discount window, PDCF, TAF, Term Securities Lending Facility and single-tranche open market operations. The programs supplied loans from August 2007 through April 2010.

Rolling Crisis

The result is a timeline illustrating how the credit crisis rolled from one bank to another as financial contagion spread.

Fed borrowings by Societe Generale (GLE), France’s second-biggest bank, peaked at $17.4 billion in May 2008, four months after the Paris-based lender announced a record 4.9 billion-euro ($7.2 billion) loss on unauthorized stock-index futures bets by former trader Jerome Kerviel.

Morgan Stanley’s top borrowing came four months later, after Lehman’s bankruptcy. Citigroup crested in January 2009, as did 43 other banks, the largest number of peak borrowings for any month during the crisis. Bank of America’s heaviest borrowings came two months after that.

Sixteen banks, including Plano, Texas-based Beal Financial Corp. and Jacksonville, Florida-based EverBank Financial Corp., didn’t hit their peaks until February or March 2010.

Using Subsidiaries

“At no point was there a material risk to the Fed or the taxpayer, as the loan required collateralization,” said Reshma Fernandes, a spokeswoman for EverBank, which borrowed as much as $250 million.

Banks maximized their borrowings by using subsidiaries to tap Fed programs at the same time. In March 2009, Charlotte, North Carolina-based Bank of America drew $78 billion from one facility through two banking units and $11.8 billion more from two other programs through its broker-dealer, Bank of America Securities LLC.

Banks also shifted balances among Fed programs. Many preferred the TAF because it carried less of the stigma associated with the discount window, often seen as the last resort for lenders in distress, according to a January 2011 paper by researchers at the New York Fed.

After the Lehman bankruptcy, hedge funds began pulling their cash out of Morgan Stanley, fearing it might be the next to collapse, the Financial Crisis Inquiry Commission said in a January report, citing interviews with former Chief Executive Officer John Mack and then-Treasurer David Wong.

Borrowings Surge

Morgan Stanley’s borrowings from the PDCF surged to $61.3 billion on Sept. 29 from zero on Sept. 14. At the same time, its loans from the Term Securities Lending Facility, or TSLF, rose to $36 billion from $3.5 billion. Morgan Stanley treasury reports released by the FCIC show the firm had $99.8 billion of liquidity on Sept. 29, a figure that included Fed borrowings.

“The cash flow was all drying up,” said Roger Lister, a former Fed economist who’s now head of financial-institutions coverage at credit-rating firm DBRS Inc. in New York. “Did they have enough resources to cope with it? The answer would be yes, but they needed the Fed.”

While Morgan Stanley’s Fed demands were the most acute, Citigroup was the most chronic borrower among the largest U.S. banks. The New York-based company borrowed $10 million from the TAF on the program’s first day in December 2007 and had more than $25 billion outstanding under all programs by May 2008, according to Bloomberg data.

Tapping Six Programs

By Nov. 21, when Citigroup began talks with the government to get a $20 billion capital injection on top of the $25 billion received a month earlier, its Fed borrowings had doubled to about $50 billion.

Over the next two months the amount almost doubled again. On Jan. 20, as the stock sank below $3 for the first time in 16 years amid investor concerns that the lender’s capital cushion might be inadequate, Citigroup was tapping six Fed programs at once. Its total borrowings amounted to more than twice the federal Department of Education’s 2011 budget.

Citigroup was in debt to the Fed on seven out of every 10 days from August 2007 through April 2010, the most frequent U.S. borrower among the 100 biggest publicly traded firms by pre- crisis market valuation. On average, the bank had a daily balance at the Fed of almost $20 billion.

‘Help Motivate Others’

“Citibank basically was sustained by the Fed for a very long time,” said Richard Herring, a finance professor at the University of Pennsylvania in Philadelphia who has studied financial crises.

Jon Diat, a Citigroup spokesman, said the bank made use of programs that “achieved the goal of instilling confidence in the markets.”

JPMorgan CEO Jamie Dimon said in a letter to shareholders last year that his bank avoided many government programs. It did use TAF, Dimon said in the letter, “but this was done at the request of the Federal Reserve to help motivate others to use the system.”

The bank, the second-largest in the U.S. by assets, first tapped the TAF in May 2008, six months after the program debuted, and then zeroed out its borrowings in September 2008. The next month, it started using TAF again.

On Feb. 26, 2009, more than a year after TAF’s creation, JPMorgan’s borrowings under the program climbed to $48 billion. On that day, the overall TAF balance for all banks hit its peak, $493.2 billion. Two weeks later, the figure began declining.

“Our prior comment is accurate,” said Howard Opinsky, a spokesman for JPMorgan.

‘The Cheapest Source’

Herring, the University of Pennsylvania professor, said some banks may have used the program to maximize profits by borrowing “from the cheapest source, because this was supposed to be secret and never revealed.”

Whether banks needed the Fed’s money for survival or used it because it offered advantageous rates, the central bank’s lender-of-last-resort role amounts to a free insurance policy for banks guaranteeing the arrival of funds in a disaster, Herring said.

An IMF report last October said regulators should consider charging banks for the right to access central bank funds.

“The extent of official intervention is clear evidence that systemic liquidity risks were under-recognized and mispriced by both the private and public sectors,” the IMF said in a separate report in April.

Access to Fed backup support “leads you to subject yourself to greater risks,” Herring said. “If it’s not there, you’re not going to take the risks that would put you in trouble and require you to have access to that kind of funding.”