Back when home prices were multiplying, banks poured oceans of borrowed money into real estate loans. Unlike the dot-com companies at the heart of the last speculative investment bubble, the new gold rush was centered on something that seemed unimpeachably solid  the American home.

But the whole thing worked only as long as housing prices rose. Falling prices landed like a bomb. Homeowners fell behind on their loans and could not qualify for new ones: There was no value left in their house to borrow against. As millions of people defaulted, the banks confronted enormous losses in a bloody period of reckoning.

In March, the Federal Reserve helped engineer a deal for JPMorgan Chase to buy troubled investment bank Bear Stearns. Many assumed the worst was over. But, this month, the open distress of Fannie Mae and Freddie Mac  two huge, government sponsored institutions that together own or guarantee nearly half of the nation’s $12 trillion in outstanding mortgages  sent a signal that more ugly surprises may lie in wait.

To calm markets, the government last weekend hurriedly put together a rescue package for Fannie and Freddie that, if used, could cost as much as $300 billion. The urgent need for a rescue  together with another round of billion-dollar write-offs on Wall Street  has unnerved economists and investors.

“I was a relative optimist, but I’ve certainly become more pessimistic,” said Alan S. Blinder, an economist at Princeton, and a former vice chairman of the board of governors at the Federal Reserve. “The financial system looks substantially worse now than it did a month ago. If the Freddie and Fannie bailout were to fail, it could get a hell of a lot worse. If we get more bank failures, we have the possibility of seeing more of these pictures of people standing in line to pull their money out. That could really scare consumers.”

In one respect, Mr. Blinder added, this is like the Great Depression. “We haven’t seen this kind of travail in the financial markets since the 1930s,” he said.

More than two years ago, Nouriel Roubini, an economist at the Stern School of Business at New York University, said that the housing bubble would give way to a financial crisis and a recession. He was widely dismissed as an attention-seeking Chicken Little. Now, Mr. Roubini says the worst is yet to come, because the account-squaring has so far been confined mostly to bad mortgages, leaving other areas remaining  credit cards, auto loans, corporate and municipal debt.