WASHINGTON -- The White House and congressional leaders agreed on a deal to authorize the biggest banking rescue in U.S. history.

The $700 billion program would effectively nationalize an array of mortgages and securities backed by them -- instruments whose deteriorating value has clogged the nation's financial system.

Lawmakers finished writing the bill late Sunday, after which Speaker of the House Nancy Pelosi declared it "frozen," meaning no changes would be made. The bill leaves many mechanics of the operation up to the Treasury. Among these are the crucial issues of how the U.S. government would decide which assets it will buy and how it would decide what to pay for them. The legislation leaves the Treasury 45 days to issue guidelines on those procedures. The bill awaits votes in Congress starting on Monday.

From big Wall Street houses to small community banks, executives have expressed an interest in signing up for the bailout. But some have said the extent of their involvement will depend on critical details.