WASHINGTON — Hours after President Bush dropped his veto threat, the House on Wednesday passed a measure to help homeowners hurt by the subprime crisis and make funds available to shore up Fannie Mae and Freddie Mac, if necessary.

The bill, which passed 272-152, would create an affordable housing fund, paid for by Fannie Mae and Freddie Mac. The fund would provide $500 million for foreclosure rescues in the first year. The measure also tightens regulations of Fannie and Freddie, the main purchasers of mortgages from credit unions. It would also create a new regulatory entity, the Federal Housing Finance Agency.

It also gives the Treasury Department the power to buy shares of Fannie and Freddie if either of those government-sponsored enterprises needs additional capital. Fannie and Freddie own or guarantee $5.2 trillion worth of home mortgages, about half of all outstanding loans. Fannie and Freddie would also be allowed to purchase loans of us much at $625,000 in high-cost parts of the nation.

CUNA and NAFCU both supported the measure and their lobbyists said the efforts help ensure future strength of Fannie and Freddie, which purchase mortgages from credit unions. But both groups have expressed concern that raising the amount of capital Fannie and Freddie must keep on hand, as some in the administration have talked about, could make less money available for mortgage purchases.

Last year, credit unions sold about 25% of their mortgages on the secondary market. According to NCUA data, through March 31 of this year, 10.19% of federally insured credit unions have sold off first mortgage loans in the secondary market. That’s down from 12.20% in 2007 and 12.26% in 2006.

During the debate, House Financial Services Committee Chairman Barney Frank (D-Mass.) said the measure would help a large number of homeowners “who were hurt by the deregulation policies passed when the Republicans were in control.”

Most of the Republicans who spoke out against the measure focused on the high potential cost of helping out Fannie and Freddie.

“They have become financial Frankensteins that threaten to gobble up their creators,” said Rep. Jeb Hensarling (R-Texas).

The Congressional Budget Office has estimated that providing additional capital to Fannie and Freddie could cost the federal government $25 billion over the next two fiscal years.

Bush in the past had expressed concern about a provision to include $4 billion to help neighborhoods affected by foreclosures. But he has changed his mind, saying he did not want to delay providing help to homeowners by having a veto fight with Congress.

The bill next goes back to the Senate and leaders there have said they hope to complete final action before Congress leaves for its recess on Aug. 1.