NEW YORK (CNNMoney.com) -- The federal government, in what will be its most far-reaching attempt yet to contain the financial crisis, is poised to establish a program to let banks get rid of mortgage-related assets that have been hard to value and harder to trade.

Treasury Secretary Henry Paulson announced the framework of the plan on Friday morning. "The federal government must implement a program to remove these illiquid assets that are weighing down our financial institutions and threatening our economy," said Paulson.

Many details of the plan remained unclear, but Paulson acknowledged the government would take on "hundreds of billions of dollars" in obligations.

Paulson and other officials expect to work through the weekend with congressional leaders to finalize details.

"We hope to move very quickly - time is of the essence," said House Speaker Nancy Pelosi, D-Calif., late Thursday night.

Rep. Barney Frank, D-Mass., chairman of the House Financial Services Committee, said he believes legislation could be acted on next week.

On Friday morning, Sen. Richard Shelby, R-Ala., who is the ranking member on the Senate Banking Committee, told CNN that the latest plan from Treasury could cost $500 billion. If so, combined with all the other monies committed by the Federal Reserve and Treasury in the form of loans and investments, that brings the headline figure on their attempts to stem the credit crisis to $1.3 trillion. But that doesn't mean that's the cost to taxpayers. (Here's why.)

The announcement on Thursday is the latest stunning turn in an extraordinary six days that have rocked Wall Street. A widening banking crisis has toppled two major firms - Lehman Brothers and Merrill Lynch - and prompted an $85 billion government loan to stem the sudden collapse of insurance giant American International Group.

Meanwhile, mainstay financial institutions are scrambling to raise cash or find merger partners - because of a freeze-up in lending and sinking investor confidence stemming from a collapse of the home mortgage market.

Talk of plan energizes markets

International and U.S. stock markets soared following news of the large government program on Thursday afternoon. On Friday morning, U.S. stocks were close to 3% higher.

The Treasury has been talking about the concept of an agency to take on bad debts of financial institutions "for several months," a source with knowledge of discussions on the issue told CNN.

There's precedent for the federal government taking on troubled assets from the private sector. In the 1930s, the Home Owners Loan Corp. was set up to issue bonds to refinance borrowers. Then during the S&L crisis Congress set up the Resolution Trust Corp. to sell assets of failed banks.

One way the agency under discussion could work is by setting up bulk auctions to buy mortgage assets from financial institutions. The auctions would be for set dollar amount purchases. Companies that want to offload the hard-to-sell assets from their balance sheets bid to sell to the government at a huge discount. The company willing to sell at the lowest price wins.

The government would then be able to sell the assets back into the market when it wanted.

According to policy research firm the Stanford Group, such a setup would allow the government to refinance borrowers in the loans owned by the government, thereby lowering the risk of their defaulting and eventually boosting the price of the mortgage security in which those loans are packaged.

The agency and auction facility is one that House Financial Services Chairman Barney Frank, D-Mass., and Senate Banking Committee Chairman Christopher Dodd have supported.

Jaret Seiberg, a financial services analyst at the Stanford Group, said he believes there is bipartisan support for allowing the Bush administration to take short-term action to "get us through the immediate crisis."

The expectation is that whatever program is decided on would only last through the presidential inauguration. "You don't want a program that will last for several years because that would limit what the next administration could do," Seiberg said.

Candidates to weigh in

On Friday, both presidential nominees are expected to detail their own plans to address the crisis.

Not everyone supports the idea that the government should buy up assets that the market currently can't value and isn't trading.

Sen. Charles Schumer, D-N.Y., on Thursday proposed his own plan that would involve the government providing a cash infusion to financial institutions in exchange for stock in the companies and let the institutions offload their mortgage investments.

Banking consultant Bert Ely is skeptical about the government getting involved at all. If the government chooses to "prop up the institutions or allows the institutions to offload asset onto a government entity, who's going to take the losses? It's financial insanity. The markets have to clear. Our fundamental problem: an oversupply of housing."

CNN senior correspondent Alan Chernoff, CNN White House correspondent Elaine Quijano and Washington producer Deirdre Walsh contributed to this report.