No one has ever proposed helping real estate speculators. And the senator’s language obscures the reality that most troubled homeowners did not get into trouble by themselves. Lenders, aided and abetted by bankers and do-nothing regulators, lured many borrowers into overly complex, ultimately unaffordable loans. Mr. McCain also failed to grasp that the foreclosure problem has gone far beyond the issue of the deserving and undeserving. What is on the line now is the health of the economy, including the viability of the financial system: Helping troubled borrowers stay in their homes would help the banks by reducing defaults and foreclosures.

The question now is not whether the government should intervene, but how. The two Democratic candidates clearly understand that better than the White House or Senator McCain. Senators Hillary Rodham Clinton and Barack Obama have called for a bigger role for the Federal Housing Administration that would allow it to restructure or refinance more troubled loans.

Both Mrs. Clinton and Mr. Obama have endorsed the best idea currently on the table to prevent foreclosure: amending the law so that troubled borrowers can have their mortgages modified in bankruptcy court. That would give lenders a big incentive to work with borrowers — reducing interest or lowering principal balances — before they opted for bankruptcy protection. Mrs. Clinton also has called for $30 billion in federal funds to bolster state and local foreclosure-prevention efforts and has proposed a 90-day moratorium on foreclosures and a rate freeze on subprime adjustable mortgages. Those measures also could help, but as the crisis has developed, the problem has become less one of resetting interest rates and more one of borrowers owing more than their homes are worth. Bankruptcy reform is a better way to deal with that problem.

The country, of course, cannot wait for the next president to be inaugurated to seriously address the foreclosure problem  although we fear that Mr. Bush still doesn’t see the urgency or the full dangers of inaction. The candidates’ prescriptions for the mortgage mess are an important guide to what sort of leader he or she would be. After eight years of Mr. Bush’s serial failures, what the country needs is a president who is willing to recognize when the government’s help is essential  and who is ready to use government power wisely.