(Bloomberg News) As markets convulsed in September 2008, Morgan Stanley Treasurer David Wong briefed the Federal Reserve on a "dark" scenario in which the U.S. firm would need at least $10 billion of emergency loans from the central bank.

It got 10 times darker by month's end. Morgan Stanley borrowed $107.3 billion, the most of any bank, according to data compiled by Bloomberg News using information released in response to Freedom of Information Act requests, related court orders and an act of Congress.

Morgan Stanley's borrowing -- more than twice the amount all banks got from the Fed in the market squeeze that followed the Sept. 11 terrorist attacks -- peaked after hedge funds pulled $128.1 billion from the firm in two weeks, documents released by the Financial Crisis Inquiry Commission show.

The first comprehensive examination of the Fed's emergency lending reveals how close the New York-based bank came to running out of cash because of a run on its prime brokerage, the unit that finances hedge funds' trades and holds their cash and securities. The Fed loans also show the degree to which Morgan Stanley and other banks depended on such brokerage accounts for funding, even though clients could close them on short notice.

"These were like hot-money deposits that could flee in an instant," said Tanya Azarchs, a former Standard & Poor's analyst who covered Morgan Stanley during the crisis and is now a consultant in Briarcliff Manor, New York. The firm "never thought that the hedge funds would get that spooked."

29,346 Pages

Morgan Stanley's Fed loans -- tallied in a Bloomberg News database assembled from government records of more than 21,000 transactions and 29,346 pages -- open a window on Wall Street's secretive, lucrative and risky dealings with hedge funds.

(View the Bloomberg interactive graphic to chart the Fed's financial bailout.)

The bank never told investors about the extent of its Fed borrowings, even as they rose to the most in the 97-year history of emergency lending by the U.S. central bank. Citigroup Inc., the New York-based lender whose balance sheet is more than twice the size of Morgan Stanley's, was the second-largest Fed borrower, with a balance of $99.5 billion in January 2009.

At the peak of Morgan Stanley's Fed borrowings, on Sept. 29, 2008, the firm reported that liquidity was "strong," without mentioning how dependent its cash stores had become on the government lifeline. Liquidity refers to the daily funds a bank needs to operate, including cash to cover withdrawals.

'Black Box'

Neither Morgan Stanley nor its competitors in prime brokerage -- Goldman Sachs Group Inc., JPMorgan Chase & Co., Citigroup and Credit Suisse Group AG -- disclose the size of their hedge-fund balances, leaving shareholders dependent on regulators who previously failed to rein in the risks.

"It remains a black box," said Adam Hurwich, a former member of the Financial Accounting Standards Board's Investors Technical Advisory Committee who's now a portfolio manager at New York-based investment firm Ulysses Management LLC. "They don't give you the information to be able to decipher whether they have changed anything."

Prime brokers facilitate short trades, the sale of borrowed stock in the hope of buying it back later at a lower price. They also make margin loans to finance stock purchases. In exchange, hedge funds usually keep their cash and stock in accounts at the prime-brokerage companies.

Frozen Assets

Few analysts understood how dependent the brokerages had become on such balances as a cheap source of funding, said Frank Suozzo, a former head of growth financial-services research at AllianceBernstein LP.

"Prime brokerage was presumed to be a pretty secure business, where the funding was not actually part of the liquidity of the bank," said Suozzo, now president of advisory firm FXS Capital LLC in Goldens Bridge, New York. "So if clients pulled their money out, the view was that money had not been lent out, so the cash would have been sitting there able to hand over. It turns out that that was not entirely correct."

In reality, "prime brokers were able to reuse clients' assets to raise cash for their own activities," the financial crisis commission wrote in its final report, published in January. Azarchs said that in her years covering Morgan Stanley for S&P she never heard executives discuss the risk that the funding might evaporate.

Lehman Brothers Holdings Inc.'s bankruptcy changed matters when it froze at least $65 billion of assets held by that firm's London-based prime brokerage. For hedge funds, it was a lesson not to bank with companies perceived to be at risk of failure, according to the commission report. So hedge funds moved quickly to pull their money from Morgan Stanley, viewed as the next weakest securities firm after Lehman, according to the report.

Unregulated, Unrated

Mark Lake, a spokesman for Morgan Stanley, declined to disclose the bank's current hedge-fund balances.

"The financial crisis of 2008 caused the industry to fundamentally re-evaluate the way it manages liquidity," Lake said. "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 wouldn't say what practices the firm has changed.

Hedge funds are mostly private, unregulated and unrated investment pools that often try to increase trading returns by supplementing their own capital with stock and cash borrowed from Wall Street's prime-brokerage divisions.

Prime-Brokerage Revenue

The world's 10 largest investment banks garnered about $10 billion in revenue from prime brokerage in 2010, almost as much as they made trading stocks, according to London-based research firm Coalition Development Ltd. The top 25 hedge-fund managers earned $22.1 billion in 2010, according to AR magazine.

Prior to the crisis, prime brokerage was one of Morgan Stanley's most profitable businesses, generating at least $2 billion of revenue a year, according to Brad Hintz, a former Morgan Stanley treasurer who now follows the firm as an analyst at Sanford C. Bernstein & Co. in New York. The bank doesn't disclose how much revenue it gets from the business.

Any requirement that prime brokers keep more cash on hand to survive a hedge-fund run may cut into the profitability of the business. That's because cash and Treasury securities that can be liquidated easily in a squeeze are less profitable to hold than loans and bonds that pay higher interest rates. Also, prime brokers may have to issue more long-term debt, which would force them to pay higher interest rates, said Richard Lindsey, a former prime-brokerage chief at Bear Stearns Cos.

'Infinitely Lived Borrowing'

"The safest way to fund something is to take out long-term debt or, even better, equity, which is essentially infinitely lived borrowing," said Lindsey, now principal of Callcott Group LLC in New York, which advises pension funds and endowments on portfolio risks. "The problem of course is that those are the most expensive forms of financing."

In July 2008, Morgan Stanley said in a regulatory filing that its policies were designed "to ensure adequate funding over a wide range of market environments." The firm's "contingency" plan anticipated a "potential, prolonged liquidity contraction over a one-year time period," according to the filing. Resources included a $5 billion credit line from a group of banks that could be used in an emergency.

At the end of August, Morgan Stanley had $179 billion of liquidity, filings show. The firm had $2 billion of Fed loans outstanding on Aug. 31, according to data compiled by Bloomberg.

As of Sept. 29, its liquidity had shrunk 44 percent to $99.8 billion, according to internal reports released by the crisis commission. By then, the firm had $107.3 billion of Fed loans outstanding, the Bloomberg data show.

'Adverse Funding Flows'

The bank didn't mention the Fed loans in a press release about its financial condition that day. Two weeks later, in another filing, the firm disclosed it was benefiting from "expanded sources of funding and liquidity resulting from the Fed's current policies," without specifying the amount.

Staffers at the Federal Reserve Bank of New York were astonished at how quickly Morgan Stanley's cash dwindled, e- mails released by the crisis commission show.

At 11:05 p.m. on Sept. 15, 2008, William Brodows, a bank supervision officer at the New York Fed, wrote to colleagues that Wong, 44, the Morgan Stanley treasurer at the time, and two other executives had called him at home that night. They wanted "to express their concern that MS had experienced some adverse funding flows late in the day from prime brokerage accounts," Brodows, 61, wrote.

Free Credit

Executives had already begun estimating Morgan Stanley's potential use of the Fed's Primary Dealer Credit Facility, a program created that year to supply emergency funds to securities firms. Such companies lacked access to the central bank's discount window, its last-resort lending program.

"In their 'dark' scenario, they felt their PDCF usage would increase to $10-$15 billion," Brodows wrote in the e- mail.

At 6:59 a.m. the next morning, the concerns were echoed in an e-mail by Matthew Eichner, 46, then an assistant director at the Securities and Exchange Commission, to Brodows and other New York Fed employees.

"Definitely some major outflows of PB balances at both GS ($5 b) and MS ($7 b)," Eichner wrote, referring to prime- brokerage balances at Goldman Sachs and Morgan Stanley. "Not pretty."

It got uglier. At 10:18 p.m. that night, a New York Fed "on-site primary dealer update" stated that Morgan Stanley's prime brokerage had suffered "free credit withdrawals of $20 billion over the last two days, contributing to a $23 billion decline in the parent company liquidity pool to $106 billion." Free credit is an industry term for hedge-fund cash balances, according to Lindsey.

'Catastrophic Scenario'

Two hours later, at 12:30 a.m. on Sept. 17, New York Fed Senior Vice President Til Schuermann forwarded the update to Brodows. Under Morgan Stanley's "catastrophic scenario," Schuermann wrote, "they expect to lose $21.5 bn over the first 2 weeks -- not 2 days -- from PB!"

Jack Gutt, a spokesman for the New York Fed, declined to comment. Eichner now works for the Fed in Washington.

Morgan Stanley's shares fell 24 percent that day, and then- Chief Executive Officer John Mack sent a memo to the firm's 46,000 employees saying "there is no rational basis for the movements in our stock."

"We're in the midst of a market controlled by fear and rumors, and short-sellers are driving our stock down," Mack, 66, wrote, adding that "we have talked to" Henry Paulson, U.S. Treasury secretary at the time, and then-SEC Chairman Christopher Cox about the issue. He reiterated that the firm had $179 billion of liquidity as of Aug. 31. He didn't mention that the figure had since dwindled to $117.7 billion, even as the firm drew an additional $38.5 billion from the Fed.

Chanos Withdrawal

Jim Chanos, president and founder of New York-based hedge fund Kynikos Associates LP, which specializes in short selling, decided to pull $1 billion out of Morgan Stanley because he was angry that Mack had put out a memo demonizing short sellers, a person with knowledge of the matter said.

Chanos, 53, has since returned to Morgan Stanley as a prime-brokerage client, partly because the firm in September 2009 announced that Mack would give up his daily operational role as CEO, while remaining chairman, the person said.

On Sept. 19, 2008, Citigroup representatives told Fed staffers that "Goldman and Credit Suisse are actively pursuing Morgan's prime business clients," according to an internal report that afternoon. The flows from Morgan Stanley and Goldman Sachs were coming in so quickly that Citigroup barely had time to vet the new clients, the report said.

Counterparty Risk

Within a week of Lehman's bankruptcy, Morgan Stanley had lost $84.8 billion of prime-brokerage free credits, according to a Morgan Stanley treasurer's report released by the crisis commission. The next week, $43.3 billion more flowed out.

By Sept. 29, the bank was borrowing $61.3 billion from the PDCF through units in the U.S. and London and getting $36 billion from the Term Securities Lending Facility. The TSLF allowed broker-dealers to swap mortgage bonds for liquid Treasuries that could then be sold or pledged for cash close to their face value. Morgan Stanley also received $10 billion from the Fed's single-tranche open-market operations, another emergency-lending program for broker-dealers.

The firm, which routinely demands collateral from hedge funds to guard against default, faced a bigger risk when clients suddenly began worrying the bank might not survive.

"This was a world turned on its head," said Bernstein's Hintz. "Who would have guessed that hedge funds would have worried about the counterparty risk of Morgan Stanley? Morgan Stanley worried about the counterparty risks to hedge funds, not the other way around."

Mitsubishi Stake

The bank's draws from the Fed began to ebb after Sept. 29, 2008, when the firm announced an agreement for Tokyo-based Mitsubishi UFJ Financial Group Inc. to invest $9 billion in Morgan Stanley for a 21 percent equity stake.

"This $9 billion investment will further bolster Morgan Stanley's strong capital and liquidity positions," the firm said in a press release that day.

Colm Kelleher, 54, Morgan Stanley's chief financial officer at the time, disclosed on Dec. 18, 2008, that the firm's prime- brokerage balances had tumbled 46 percent to about $150 billion as of Nov. 30 from $280 billion on Aug. 31. On a conference call that day, Kelleher said the erosion was "clearly a function of the downsizing of the hedge-fund business."

'Safer Place'

While many hedge funds have since returned to Morgan Stanley, the firm doesn't provide detailed updates on its prime- brokerage balances.

"Prime-brokerage revenues were up significantly" over the previous quarter, while client balances "continued to grow modestly," Ruth Porat, 53, who replaced Kelleher as CFO, said on a call with investors on July 21, without disclosing amounts.

Morgan Stanley's liquidity stood at $182 billion as of June 30 and represents 22 percent of total assets, up from 18 percent just before the crisis.

"Nobody could withstand a run on liquidity, except, of course, the government," Morgan Stanley CEO James Gorman, 53, said in a May 24 speech in New York. "Hopefully we're in a much safer place as a result of it."

In a brief interview afterward, Gorman declined to comment on what changes the firm had made in its prime brokerage.

"We give out as much as we feel is appropriate on that business," he said.

A new rule adopted in December by the Basel Committee on Banking Supervision, an international panel of regulators, requires global banks to keep enough cash or cash-like reserves on hand to survive a 25 percent run-off of balances in "clearing, custody or cash-management" accounts during a crisis lasting 30 days. The rule doesn't take effect until 2015.

'Almost Impossible'

While Morgan Stanley's liquidity has increased, "it's almost impossible" to judge whether it's enough, Hintz said.

"You don't know whether the liquidity pool is required by the ratings agencies, or whether it is required by the Federal Reserve," Hintz said. "I suspect there's something of both. But it's a recognition that the old contingency funding plans had a flaw, and that these events can happen very quickly."

Hedge funds have changed their business practices to protect themselves from the collapse of a prime broker, limiting the amount of funding that securities firms can get from such relationships, said Allan Yip, a former in-house prime-brokerage lawyer for Bear Stearns.

Repledging Assets

Many funds now restrict the ability of securities firms to repledge assets to obtain funding, a process known as "rehypothecation," Yip said. More funds stipulate that their cash must be held in separate bank accounts.

"This has been a market-driven change, in terms of what liquidity can be obtained by the banks," said Yip, who now advises hedge funds on prime-brokerage and trading documentation as a partner in London at law firm Simmons & Simmons LLP.

Not that the funds have to worry. It's probable the central bank would again lend to a big firm such as Morgan Stanley if another crisis hit, said Viral Acharya, a New York University finance professor who serves as an academic adviser to the Fed, according to the university's website.

For hedge funds, "it's basically like you get the too-big- to-fail benefit from being connected to a large financial firm," Acharya said. "If you dealt with a small prime broker, say a boutique investment firm, it's unlikely to be bailed out."