House Republican leaders secured a hard-fought victory early yesterday when they eked out passage of a $50 billion budget-cutting bill, but the broad measure must now be reconciled with a far more modest Senate version that largely steers clear of reducing programs for the poor.

The budget measure squeaked through the House 217 to 215 at 1:45 a.m., in a vote orchestrated by GOP leaders to allow as many Republicans as possible to vote against the budget-slashing measure. Fourteen joined all Democrats in opposition.

The blueprint would impose new fees on Medicaid recipients, squeeze student loan programs, cut child support enforcement and push tens of thousands of low-income families off food stamps.

GOP leaders hailed the tough-minded measure as proof that the party is ready to make the difficult decisions necessary to confront stubborn budget deficits. While the $50 billion in cuts represents one-third of a percent of the $14.3 trillion the government would spend over the next five years without them, the policy changes would be far-reaching.

The measure would grant state governments far more power to control access to Medicaid, the federal health care program for the poor. It would extend the welfare restructuring law of 1997, adding stiffer work requirements to those on public assistance. It would eliminate some agriculture support programs, raise the bar for legal immigrants seeking food stamps, and sell off hundreds of thousands, if not millions, of acres of federal land to private bidders.

The House measure differs sharply from the Senate version, which strives to avoid direct cuts to anti-poverty programs. The Senate plan also shies away from many of the policy changes the House tackled, such as an extension of the welfare changes.

The Senate version, passed earlier this month, would save $35 billion, largely by squeezing insurance and pharmaceutical firms, cracking down on middle-class Medicaid fraud, auctioning the public broadcasting spectrum, and raising premiums on companies covered by the federal Pension Benefit Guaranty Corp.

The chief negotiators on a final deal conceded that the task ahead may be perilous. "It was hard getting to this point. It will be hard getting to the next point," said House Budget Committee Chairman Jim Nussle (R-Iowa). "This is hard."

Senate Budget Committee Chairman Judd Gregg (R-N.H.) said the biggest hurdles will be a Senate provision -- stripped out of the House plan -- that would open Alaska's Arctic National Wildlife Refuge to oil drilling and a White House veto threat over a Senate provision that would redesignate money that has been set aside to entice managed-care companies into the Medicare program and use it for deficit reduction. White House officials say preserving the Medicare fund -- worth $5.6 billion over five years -- is crucial to ensure private-sector competition in the new prescription drug benefit. Gregg called it a "slush fund for the pharmaceutical companies."

The drilling and Medicare fund issues have broad ramifications. Acting House Majority Leader Roy Blunt (R-Mo.) has said he does not believe a final budget plan can be passed in the House with the Alaska drilling provision, because moderate Republicans have pledged to oppose it. But two of the top budget negotiators, Sens. Pete V. Domenici (R-N.M.) and Ted Stevens (R-Alaska), have vowed not to let any agreement emerge without it.

"I just never give up. That's all," Stevens said yesterday.

The Medicare fund presents a similar quandary. Facing intransigent opposition to deep Medicaid cuts, Senate budget writers tapped the Medicare insurance fund to avoid the kind of changes to Medicaid that the House resorted to when it steered clear of Medicare.

Gregg said he is committed to raising the savings target from the Senate's $35 billion level toward the House's $50 billion mark. But if negotiators shy away from a showdown with the White House over the Medicare fund, some of that savings will have to be found elsewhere. Moderate Republicans in the Senate remain adamant that they are not about to accept the House's cuts to programs for the poor.

"If I'm presented that, I vote no," said Sen. Gordon Smith (R-Ore.), who had precipitated another budget fight this spring over proposed Medicaid cuts. "We'll try" to reach agreement, he said, "but they've got some pretty rough rapids to navigate."

The uncertain fate of the budget bills did not dampen the mood of a House Republican leadership that badly needed the victory. Buffeted by the indictment-induced resignation of Rep. Tom DeLay (R-Tex.) as House majority leader, GOP leaders were forced last week to pull the budget measure from consideration for lack of votes. On Thursday, they suffered a rare and embarrassing defeat when nearly two dozen Republicans joined Democrats to defeat the annual spending bill that funds health, education and labor programs.

Conservatives had threatened to force a leadership election in January if the budget vote failed, while some moderates had warned that a successful vote would splinter the party. Without DeLay to round up votes, it fell to Blunt to do much of the groundwork, and Speaker J. Dennis Hastert (R-Ill.) had to put his popularity on the line.

Lawmakers said yesterday that Hastert has emerged as the biggest winner in the budget battle.

"These budget votes are the toughest votes we make, the toughest," said Rep. Ray LaHood (R-Ill.). "And the fact that the leadership is fractured, that a lot more [of the responsibility] fell on the speaker, made it that much harder and take a little longer."

Moderate Republicans -- long maligned as weak and easily outmaneuvered -- say they, too, emerged as a stronger, more cohesive block. They forced their leaders to strip out the Alaska drilling provision and a provision lifting a moratorium on offshore energy exploration. They trimmed back cuts to Medicaid, food stamps and school lunch programs, and they won promises that any final agreement will include an extension of a controversial dairy farm support program.

"The moderates feel we have been heard, we have been listened to," said Rep. Sherwood L. Boehlert (R-N.Y.).

In the end, said Rep. Steven C. LaTourette (R-Ohio), "it was better to have the message that we can govern than 'Things are falling apart.' "

Sen. Judd Gregg said the biggest hurdles to a deal on budget cuts will be a Senate provision on Alaska oil drilling and a White House veto threat over a Senate provision on redirecting some Medicare funds for deficit reduction.