“This institution was a big question mark about the health of the deposit fund,” Sheila C. Bair, the chairwoman of the F.D.I.C., said on a conference call Thursday. “It was unique in its size and exposure to higher risk mortgages and the distressed housing market. This is the big one that everybody was worried about.” She said that the bank’s rapidly deteriorating condition prompted regulators to seize it Thursday, and not on a Friday as is typical for bank closures.

For weeks, the Federal Reserve and the Treasury Department were nervous about the fate of WaMu, among the worst-hit by the housing crisis, and pressed hard for the bank to sell itself. Washington Mutual publicly insisted that it could remain independent, but the giant thrift had quietly hired Goldman Sachs about two weeks ago to identify potential bidders. But nobody could make the numbers work and several deadlines passed without anyone submitting a bid.

But as panic gripped financial markets last week after the collapse of Lehman Brothers, WaMu customers started withdrawing their deposits. The government then stepped up its efforts, at points going behind WaMu’s back to work privately with four potential bidders on a deal. On Wednesday afternoon, the government solicited formal written bids. On Thursday morning, regulators notified James Dimon, chairman and chief executive of JPMorgan Chase, that he was the likely winner.“We are building a company,” Mr. Dimon said in a brief interview. “We are kind of lucky to have this opportunity to do this. We always had our eye on it.”

But the seizure and the deal with JPMorgan came as a shock to Washington Mutual’s board, which was kept completely in the dark: the company’s new chief executive, Alan H. Fishman, was in midair, flying from New York to Seattle at the time the deal was finally brokered, according to people briefed on the situation. Mr. Fishman, who has been on the job for less than three weeks, is eligible for $11.6 million in cash severance and will get to keep his $7.5 million signing bonus, according to an analysis by James F. Reda and Associates. WaMu was not immediately available for comment.

The government has dealt with troubled financial institutions differently. Lehman Brothers and Washington Mutual, which were less entangled with the rest of the financial system, were allowed to collapse. But the government took emergency measures to stabilize Goldman Sachs, Morgan Stanley and the American International Group, the insurance giant.

Federal regulators had been trying to broker a deal for Washington Mutual because a takeover by the F.D.I.C. would have dealt a crushing blow to the federal government’s deposit insurance fund. The fund, which stood at $45.2 billion at the end of June, has been severely depleted after suffering a loss from the sudden collapse of IndyMac Bank. Analysts say that a failure of Washington Mutual would have cost the fund as much as $30 billion or more.

The deal will end WaMu’s 119-year run as an independent company and give JPMorgan Chase branches in California and other markets where it does not have a big presence.