The moment the rescue package was approved in the House of Representatives
The US House of Representatives has passed a $700bn (£394bn) government plan to rescue the US financial sector.
The 263-171 vote was the second in a week, following its shock rejection of an earlier version on Monday.
The package is aimed at buying up the bad debts of failing financial institutions on Wall Street.
US President George W Bush praised lawmakers for their "spirit of co-operation" before signing the bill into law later on Friday.
The House adopted the new version after the Senate added about $100bn in new tax breaks to win Republican votes.
The Dow Jones Industrial Average had been buoyant ahead of the vote, surging up 250 points, but those gains were pared back amid profit taking and continued uncertainty, and it closed down 1.5%.
In a televised response after the House vote, President Bush said: "In coming together we have acted boldly to prevent a crisis on Wall Street becoming a crisis in communities across the country."
Mr Bush acknowledged there were concerns about the government's role and the cost of the plan.
He said he believed in intervention only when it was necessary - but "in this situation, action is clearly necessary".
However, he warned the package would take time to have an effect on the economy.
Despite traders' celebrations, the Dow Jones finished down
His Treasury Secretary Henry Paulson vowed speedy action to get the rescue package up and operating.
And Federal Reserve Chairman Ben Bernanke applauded Congress, saying the bill was a critical step toward stabilising financial markets.
BBC North America business correspondent Greg Wood says the passing of the bail-out plan is just the first stage and it will be several months before anyone can tell whether it is working.
Legislators were hugely divided on the bill during the House debate.
Some who had voted "No" on Monday said they were switching because of the improvements to the bill but many of them still expressed serious reservations.
President Bush thanks Congress after the bail-out bill is approved
Others maintained their opposition, saying the bill was still a bail-out benefiting mainly Wall Street.
But House Speaker Nancy Pelosi was one of many to refer to those suffering on America's Main Street and said that urgent action was needed "to avoid economic catastrophe".
"The bright light of accountability will protect the taxpayer," she vowed.
Democrat majority whip James Clyburn said: "We came together in a very strong, bipartisan way to deliver this decisive victory for the American people."
Georgia Democrat John Lewis reflected the views of many when he said: "I have decided that the cost of doing nothing is greater than the cost of doing something."
South Carolina Republican J Gresham Barrett added: "No matter what we do or what we pass, there are still tough times out there. People are mad - I'm mad. We have to act. We have to act now."
But Texas Republican Jeb Hensarling asked: "How can we have capitalism on the way up and socialism on the way down?"
Friday's vote showed 172 Democrats in favour and 63 against. A majority of Republicans still opposed the bill - 91 voted for it and 108 against.
The House rejected the earlier version by 228 votes to 205 on Monday.
The Senate passed an amended bill on Wednesday that raised the government's guarantee on savings from $100,000 to $250,000.
It also included tax breaks to help small businesses and to boost alternative energy, expanded the child tax credit and extended help to victims of recent hurricanes.
The US had experienced more evidence of the financial volatility ahead of the vote on Friday.
The Wells Fargo bank announced it would buy troubled rival Wachovia in a $15.1bn (£8.5bn) deal, while the US also reported its biggest monthly job loss in more than five years.