NEW YORK (CNNMoney.com) -- After two weeks of contentious and often emotional debate, the federal government's far-reaching and historic plan to bail out the nation's financial system was signed into law by President Bush on Friday afternoon.

"By coming together on this legislation, we have acted boldly to prevent the crisis on Wall Street from becoming a crisis in communities across our country," Bush said less than an hour after the House voted 263 to 171 to pass the bill.

The House vote followed a strong lobbying push by the White House and other supporters of the bill. The House rejected a similar measure on Monday - a defeat that shocked the markets and congressional leaders on both sides of the aisle.

The law, which allows the Treasury Secretary to purchase as much as $700 billion in troubled assets in a bid to kick-start lending, ushers in one of the most far-reaching interventions in the economy since the Great Depression.

Federal Reserve Chairman Ben Bernanke said he welcomed the news. "The legislation is a critical step toward stabilizing our financial markets and ensuring an uninterrupted flow of credit to households and businesses," he said.

Treasury Secretary Henry Paulson said he would act swiftly but "methodically" to carry out the plan.

"The broad authorities in this legislation, when combined with existing regulatory authorities and resources, gives us the ability to protect and recapitalize our financial system as we work through the stresses in our credit markets," Paulson said.

Switching votes

Republicans picked up 26 votes in favor of the bill among caucus members who'd originally voted against it on Monday, while Democrats picked up an additional 32 votes.

According to voting results, 172 Democrats voted in favor of the bill while 62 opposed it; and 91 Republicans voted for it and 108 voted against it.

"We did today what we had to do because past mistakes made it necessary," said Rep. Barney Frank, D-Mass., one of the lead negotiators on the bill.

Republicans who switched their votes from "no" to "yes" included Rep. Howard Coble, R-N.C., and Rep. Sue Myrick, R-N.C. In a statement before the vote, Myrick said, "We're on the cusp of a complete catastrophic credit meltdown. There is no liquidity in the market. We are out of time. Either you believe that fact, or you don't. I do."

Democrats who switched to "yes" votes include Rep. John Lewis, D-Ga., Rep. Elijah Cummings, D-Md., and Rep. Donna Edwards, D-Md.

Cummings noted before the vote that this was the most difficult vote for him in his 12 years in Congress. "But today we must step up and lead," he said.

Earlier this week, Cummings and Edwards were part of a group that had been working on an alternate proposal. The lawmakers had lobbied strongly but unsuccessfully to include, among other things, a change to the bankruptcy law that would let judges modify mortgages on primary residences, a move the lending industry has strongly opposed.

Cummings and Edwards said they had received calls from Democratic presidential nominee Barack Obama, encouraging them to change their minds. They said they received assurances that he was committed to the bankruptcy provision.

House Minority Whip Roy Blunt, R-Mo., told reporters before the vote on Friday morning that three things have happened to change some Republican members' opposition to the bill since the House defeated the measure on Monday: more calls to their district offices in support of the bill; a clarification of SEC accounting rules; and the Senate additions, passed on Wednesday, including a number of tax break extenders and an increase in FDIC deposit insurance coverage. (What's in the law.)

Economy in need of a fix

The House debate began on the heels of two market-moving events early Friday morning: a worse-than-expected monthly jobs number; and a surprise merger announcement between Wachovia and Wells Fargo.

For the past two weeks, lending between banks and between banks and businesses has gotten considerably more expensive. Small businesses are having trouble getting loans. As of midday Friday, one key measure showed that banks were hoarding cash rather than loaning it. Meanwhile, a risk indicator showing banks' willingness to lend to each other was at an all-time high.

Advocates say the plan is crucial to government efforts to attack a credit crisis that threatens the economy and would free up banks to lend more. Opponents say it rewards bad decisions by Wall Street, puts taxpayers at risk and fails to address the real economic problems facing Americans.

Lawmakers who voted against the bill warned that "being stampeded" into voting the bill through would be a serious mistake.

"Wall Street is so hungry for the $700 billion they can taste it. To get it they need to ... create panic, block alternatives and herd the cattle. We ask Congress not to rush. Defeating this bill today isn't the last step. It's the first step in passing a good bill," said Rep. Brad Sherman, D-Calif., before the vote.

Rep. Marcy Kaptur, D-Ohio, who has called for the FDIC and SEC to use their powers to ease the credit crisis, said, "Pray for our Republic. She's being placed in ... very greedy hands."

Lawmakers who stood in support of the plan noted that it will help Main Street, not Wall Street. "We [would] rescue the jobs, the savings and the ability to get a loan for each hard-working American," said Rep. Louise Slaughter, D-N.Y.

Rep. Maxine Waters, D-Calif., noted in the floor debate that the plan as amended by lawmakers also supports homeowners at risk of foreclosure by giving the government more say in how loans for troubled borrowers are modified so people can stay in their homes.

"When we buy up this toxic paper, we're in charge. We can do the kind of loan modifications we've been urging [the industry coalition] Hope Now to get done. ... We'll be able to set some standards," Waters said during the floor debate. "For anybody who says there's nothing in this bill for homeowners, they're incorrect."

Many questions remain

Even though the financial rescue plan has been signed into law, there are still a lot of unanswered questions regarding how some key provisions will work.

For instance, just how will Treasury structure the pricing and purchase of the troubled assets, which are troubled precisely because they're difficult-to-value? For one thing, Treasury will be buying a variety of asset types backed by mortgages and loans of hard-to-verify credit quality. And financial institutions are not all in the same pickle - they each have their own combination of problems.

"The challenges our institutions face are just as varied - from holding illiquid mortgage backed securities, to illiquid whole loans, to raising needed capital, to simply facing a crisis of confidence," Paulson said after the House vote.

How much will the investment managers that Paulson will hire to run the asset purchase program be paid? What will the hiring guidelines be to prevent conflicts of interest?

One thing seems certain: Treasury staff are likely to be working more nights and weekends in the next month trying to figure it all out.

CNN congressional producers Deirdre Walsh and Lesa Jansen contributed to this report.