The bill is supposed to help struggling homeowners
The US House of Representatives has passed a massive housing rescue bill that could help struggling homeowners get cheaper loans.
The vote came after the White House announced that President George W Bush had dropped his threat to veto it.
The bill will now be passed to the Senate for approval before being signed into law.
More than a million Americans have lost their homes in the worst housing crisis since the Great Depression.
President Bush's change of heart came despite his objection to a provision for $3.9bn (£1.95bn) in community grants to buy up and repair repossessed homes.
Under the rescue plan, hundreds of thousands of homeowners trapped in mortgages they cannot afford on homes that have fallen in value would be able to refinance their mortgages with more affordable, fixed-rate loans backed by the Federal Housing Administration.
The bill would set up the first national licensing system for mortgage brokers and other loan officers.
It also includes a tax break of as much as $7,500 for first time home buyers, as well as help for troubled mortgage finance providers Fannie Mae and Freddie Mac.
The BBC's Michelle Fleury in New York says the need for a rescue plan for Fannie Mae and Freddie Mac gave the housing bill a new sense of urgency.
Economists had expected existing home sales to fall
Keeping the two firms open is seen as crucial to the functioning of the housing market, since between them they own or guarantee half the entire mortgage debt in the US.
But correspondents say a government rescue could land US taxpayers with a big bill.
Earlier this week, the Congressional Budget Office said the rescue plan could cost as much as $100bn, although they said the most likely outcome was that it would cost $25bn.
Many congressional Republicans are angry about the legislation, which they say bails out irresponsible homeowners and unscrupulous lenders.
Nonetheless, with the White House is now in favour of the plan, it is expected to be approved by the Senate, possibly on Friday or Saturday.
"The positive aspects of the bill are needed now to increase confidence and stability in the housing and financial markets," White House spokeswoman Dana Perino said.
The bill passed in the House by a vote of 272 to 152.
It is hoped White House measures will help lift the housing misery
US Treasury Secretary Henry M Paulson and both Democratic and Republican lawmakers negotiated the final deal.
The bill hands the Treasury Department the power to extend Fannie Mae and Freddie Mac an unlimited line of credit and to buy an unspecified amount of their stock if necessary.
Mr Paulson called the legislation "a strong message that we are sending to investors" that would play a crucial role in "helping turn the corner" on the housing crisis.