If any of the mortgages went bad  and, it turned out, many did  the bonds at the bottom of the pecking order would suffer losses first, followed by the next lowest, and so on up the chain. By one measure, the Bear Stearns Alt-A Trust 2006-7 has performed well: It has suffered losses of about 1.6 percent. Of those loans, 778 have been paid off or moved through the foreclosure process.

But by many other measures, it’s a toxic portfolio. Of the 2,093 loans that remain, 23 percent are delinquent or in foreclosure, according to Bloomberg News data. Initially rated triple-A, the most senior of the securities were downgraded to near junk bond status last week. Valuing mortgage bonds, even the safest variety, requires guesstimates: How many homeowners will fall behind on their mortgages? If the bank forecloses, what will the homes sell for? Investments like the Bear Stearns securities are almost certain to lose value as long as home prices keep falling.

“Under the current circumstances it’s likely that you are going to take a loss on these loans,” said Chandrajit Bhattacharya, a mortgage strategist at Credit Suisse, the investment bank.

The Bear Stearns bonds are just one example of the kind of assets the government could buy, and they are by no means the most complicated of the lot. Wall Street took bonds like those of Bear Stearns and bundled and rebundled them into even trickier investments known as collateralized debt obligations, or C.D.O.’s

“No two pieces of paper are the same,” said Mr. Feltus of Pioneer Investments.

On Wall Street, many of these C.D.O.’s have been selling for pennies on the dollar, if they are selling at all. In July, Merrill Lynch, struggling to bolster its finances, sold $31 billion of tricky mortgage-linked investments for 22 cents on the dollar. Last November, Citadel, a large hedge fund in Chicago, bought $3 billion of mortgage securities and other investments for 27 cents on the dollar.

But Citigroup, the financial giant, values similar investments on its books at 61 cents on the dollar. Citigroup says its C.D.O.’s are relatively high quality because they were created before lending standards weakened in 2006.

A big challenge for Treasury officials will be deciding whether to buy the troubled investments near the values at which the banks hold them on their books. That would help minimize losses for financial institutions. Driving a hard bargain, however, would protect taxpayers.