Last August, then-Treasury secretary Henry Paulson called on Wachtell to help come up with a plan to stave off insolvency at the increasingly undercapitalized Federal Home Loan Mortgage Corporation (Freddie Mac) and Federal National Mortgage Association (Fannie Mae). At issue was the fate of some $5 trillion in mortgage-backed debt-a sum then roughly equivalent to the national debt-much of which was held by foreign investors and governments.

A month earlier, Fannie’s and Freddie’s stock prices had plunged, raising concerns that they would not be able to raise enough capital to meet their financial reporting requirements. Congress quickly armed the U.S. Department of the Treasury with new authority over Fannie and Freddie. What form the intervention should take wasn’t obvious-but what was clear was that crucial decisions needed to be made quickly and quietly. “It had to get done before there was a selloff of this debt,” says then-Treasury general counsel Robert Hoyt, “because once that starts, it can’t be contained.”

This was the first time that Wachtell had represented the Treasury, and the firm agreed to do the work for no fee. Over the next three weeks, Harold Novikoff, a 32-year veteran of creditor-side work who chairs Wachtell’s restructuring and finance practices, helped design an intervention strategy-in absolute secrecy, to prevent the Treasury’s plans from reaching the markets prematurely.

To camouflage the firm’s work, Novikoff had his 17-lawyer team travel to Washington, D.C., on separate airplanes; a single associate booked the six or seven hotel rooms needed during the final stretch of negotiations under his own name “so there wouldn’t be, ‘Oh, Hal Novikoff and [Wachtell M&A partner] Ed Herlihy are heading down, something must be up,’ ” Novikoff says.

Paulson gave the lawyers until September 5 to come up with a plan. The collapse of The Bear Stearns Companies Inc. in March had weakened Fannie’s and Freddie’s underpinnings, and there were already concerns that other banks might fail, disrupting Fannie and Freddie further. Novikoff’s team, in consultation with the Treasury’s outside financial adviser at Morgan Stanley, was able to do an initial “tear”-a quick legal and financial analysis-of possible intervention scenarios in 14 hours, Hoyt says.

The lawyers had no controlling precedent, only a notion that there should be as little disruption as possible to the mortgage-backed debt markets. Novikoff’s team presented three options: a receivership, which would have stopped creditors from collecting on debts until a business restructuring plan was finalized; a direct investment, which would have left both business and management intact; and a conservatorship, which would keep the business intact but replace the management.

Receivership, Novikoff advised the Treasury, was potentially the most unsettling to the markets. “We were trying to do the opposite,” he says, “to allow all preexisting obligations to continue to be paid without interruption.” Treasury officials chose conservatorship; it was left to Novikoff’s team to draft financial arrangements that would give confidence to investors while protecting taxpayers.

Leaving Fannie’s and Freddie’s management out of the loop was an unusual twist for Novikoff. Generally, creditor-side restructuring lawyers like Novikoff work closely with a debtor’s management. But the government was behaving more like a bidder preparing a hostile tender offer. Paulson and others worried that the embattled managers would go to the media if they had notice of their planned ouster. (Indeed, when management of both enterprises were told to convene an emergency board meeting with regulators on September 5, a story appeared in the financial press within hours.)

The deal, which closed on September 7, committed the U.S. government to an unprecedented level of direct financial support: The government promised to buy up to $100 billion of senior preferred stock in either entity whenever it dipped below its solvency threshold. In recent months, as mortgage default rates rose, the Treasury has poured roughly $60 billion into the newly managed entities, but the markets continue to buy the debt the two have issued. So far, Fannie and Freddie and their newly installed management are weathering the storm.

In the end, there was good reason for Paulson’s tight deadline: Six days afterward, Lehman Brothers Holdings Inc. was dead, and American International Group edged toward a death spiral.

“There are very few lawyers in America who could have done the work Hal did,” says Hoyt. “He was one of the unsung heroes of the government’s efforts to stabilize the financial markets.”

See all 25 of our Dealmakers of the Year, from the April 2009 issue of The American Lawyer.