WASHINGTON — Profits from government-sponsored mortgage giants Fannie Mae and Freddie Mac, instead of taxpayers, would back up a home-loan rescue for up to 500,000 strapped borrowers, under a plan approved by a key Senate committee Tuesday.

Democrats and Republicans banded together to push the plan through the Senate Banking Committee on a 19-2 vote, boosting the chances for a broad election-year housing-aid package.

The centerpiece of the measure would give cheaper, government-backed mortgages to up to 500,000 strapped borrowers. Eight Republicans joined the panel's Democrats to back it, after extracting a major concession to pay for the foreclosure-prevention plan by diverting money intended to pay for housing for the poor.

The bill also tightens regulation of Fannie Mae and Freddie Mac, which would finance a new affordable-housing fund that would temporarily be used to pay for the foreclosure prevention program.

"If I were writing this on my own, it would look different, but it is a balance," said Sen. Christopher J. Dodd, the committee's chairman, who predicted the measure could clear Congress by July 4. "This is a major step forward."

Officials have warned that President Bush would veto a similar House-passed measure, calling it a burdensome bailout that exposes taxpayers to undue risk. The bill would let the Federal Housing Administration back up to $300 billion in new loans for struggling homeowners who would otherwise be considered too financially risky to refinance into a fixed-rate, government-insured mortgage.

Borrowers would have to show they could afford the new loans, and to share with the government half of their new equity and any future proceeds from selling or refinancing again. Mortgage holders would have to write down the existing loans at a substantial loss, in exchange for avoiding a costly foreclosure.

The White House was noncommittal Tuesday about the Senate bill, saying policy aides were analyzing the financing mechanism to see whether it addressed Bush's objections.

"That's what we're checking, because we don't believe that taxpayer dollars should be used to help lenders or speculators. We think that we should be able to help Americans who want to stay in their homes and can afford to stay in their homes find a way to do that without using taxpayer dollars," said Dana Perino, the White House press secretary.

The idea of an FHA-based foreclosure prevention bill has drawn staunch opposition from most Republicans, many of whom say they are concerned that taxpayers would be on the hook for huge losses if homeowners defaulted on their new loans.

Many Democrats are displeased about the idea of using a fund designed to help the lowest-income people avoid homelessness to instead help middle-class people stay in their homes.

The housing package is far from final. The Senate won't act on the measure until after lawmakers return from a weeklong Memorial Day break, and even after that, the bill would have to make it through a contentious and complicated round of House-Senate negotiations before it could be presented to Bush.