WASHINGTON (AP) – Rescue legislation sailed through the House Wednesday aimed at helping 400,000 strapped homeowners avoid foreclosure and preventing troubled mortgage giants Fannie Mae and Freddie Mac from collapsing.

The 272-152 vote reflected a congressional push to send election-year help to struggling borrowers and to reassure jittery financial markets about the health of two pillars of the mortgage market.

Hours before the vote, President Bush dropped his opposition to the measure, which is now on track to pass the Senate and become law within days.

The White House swallowed its distaste for $3.9 billion in grants the bill would provide for devastated neighborhoods. The Bush administration gains the power to throw a lifeline to Fannie Mae and Freddie Mac as part of the measure that also is designed to rein in the government-sponsored mortgage firms.

The administration and lawmakers in both parties teamed to negotiate the measure, which accomplishes several Democratic priorities, including federal help for homeowners, a new permanent affordable housing fund financed by Fannie and Freddie and the $3.9 billion for hard-hit neighborhoods. The grants are for buying and fixing up foreclosed properties.

“It is the product of a very significant set of compromises,” said Rep. Barney Frank, D-Mass., the Financial Services Committee chairman. “We are dealing with the consequences of bad decisions and inaction and malfeasance from years before. Obviously, it requires a joint effort. “

In a statement on the bill, the White House said parts of it “are too important to the stability of our nation’s housing market, financial system and the broader economy not to be enacted immediately.”

Bush had objected to the neighborhood grants, saying they would help bankers and lenders, not homeowners who are in trouble. Still, Dana Perino, the White House press secretary, said a showdown with Congress over the funds would be ill-timed.

It was a striking split for Bush and many congressional Republicans. GOP leaders denounced the housing legislation as a bailout for irresponsible homeowners and unscrupulous lenders, even as they acknowledged it was probably necessary.

“It’s a bill that I wish I could support. It’s a bill that the market clearly needs … but this is not a bill that I can support,” said Rep. John A. Boehner, R-Ohio, the minority leader.

Still, 45 Republicans – most from districts ravaged by the housing crisis – voted “yes,” reflecting the political potency of the package at a time when economic concerns are foremost in voters’ minds.

The measure hands the Treasury Department the power to extend the government-sponsored mortgage companies an unlimited line of credit and to buy an unspecified amount of their stock, if necessary, to prop up Fannie Mae and Freddie Mac, two companies chartered by Congress. The firms back or own $5 trillion in U.S. mortgages – nearly half the nation’s total.

Sen. Richard C. Shelby of Alabama, the senior Banking Committee Republican who was his party’s lead negotiator on the measure, said Bush’s turnabout reflected political reality.

“They looked at the Hill, they counted some votes and they see there’s pretty broad support for this,” Shelby said.

He and Sen. Christopher J. Dodd, D-Conn., the committee chairman, said they would push for swift approval of the measure without any changes.

“We’ll be anxious to move this product along,” Dodd said .

But conservative GOP senators led by Sen. Jim DeMint, R-S.C., were threatening to slow the measure unless Democrats allowed a vote on barring Fannie Mae and Freddie Mac – whose political operations are legendary – from lobbying and making campaign contributions. Senators’ objections could delay enactment of the measure until next week.

Before Wednesday’s vote, Treasury Secretary Henry Paulson told reporters that completing the measure was “a strong message that we are sending to investors” that would play a key role in “helping us turn the corner” on the housing crisis.

Congressional analysts estimate that a government rescue of the mortgage giants could cost $25 billion, but they predict there’s a better than even chance it won’t be needed.

The bill would let hundreds of thousands of homeowners trapped in mortgages they can’t afford on homes that have plummeted in value try to escape foreclosure by refinancing into more affordable, fixed-rate loans backed by the Federal Housing Administration. Lenders would have to agree to take a substantial loss on the existing loans, and in return, they would walk away with at least some payoff and avoid the often-costly foreclosure process.

The plan also creates a new regulator with tighter controls for Fannie Mae and Freddie Mac and modernizes the FHA.

It includes about $15 billion in housing tax breaks, including a credit of up to $7,500 for first-time buyers who purchase homes between April 9, 2008, and July 1, 2009. It also allows people who don’t itemize their taxes to claim a $500-$1,000 deduction on their 2008 property taxes. That chiefly benefits homeowners who have paid off their loans and can’t claim a federal tax deduction for mortgage interest.

And it increases the statutory limit on the national debt by $800 billion, to $10.6 trillion.

The White House, which initially denounced portions of the bill as too burdensome on the government and risky for taxpayers, dropped most of its objections in recent weeks in search of a swift deal. An urgent request by Paulson to throw Fannie Mae and Freddie Mac a federal lifeline acted as a powerful locomotive for a deal.

The bill sets a cap of $625,000 on the loans that Fannie Mae and Freddie Mac may buy and the FHA may insure. It lets them buy and back mortgages up to 15 percent above the median home price in certain areas.

Lawmakers abandoned efforts to place conditions on any Fannie and Freddie rescue, but the bill hands the new regulator approval power over the pay packages of executives at the companies.

It also counts any federal infusion for the mortgage giants under the debt limit, essentially capping how much the government could spend to stabilize the companies without further approval from Congress. As of Tuesday, the national debt that counts toward the limit stood at just under $9.5 trillion, roughly $350 billion below the statutory ceiling.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.