WASHINGTON - Congress responded speedily to voters' angst over rising grocery prices and $4-a-gallon gasoline yesterday, bucking President Bush's veto threats with lopsided votes to boost food stamps and farm subsidies after ordering Bush to quit pouring oil into the nation's emergency reserves.

Republicans, worried about losses in the fall elections, abandoned Bush on the votes.

"If you're running for office this year, obviously you want to demonstrate that you can put up a record of accomplishment that's based upon working with both sides of the political aisle," said Sen. John Thune (R., S.D.).

Despite Bush's strong opposition, 35 of the Senate's 49 Republicans voted yesterday with Democrats to pass and send to the White House a $290 billion farm bill that will increase food aid for the needy as well as subsidies for farmers enjoying record high incomes.

The Senate vote was 81-15, with all six Philadelphia-area senators voting in favor and all three presidential candidates not voting.

In the House, 100 Republicans had voted the same way Wednesday, a day after the party's third straight loss of a long-help GOP seat to Democrats in special elections.

The three House districts, in Illinois, Louisiana and Mississippi, include farm areas.

"I think the fact that they've lost three House seats in a row, people are thinking: 'Gee, do I really want to stand with the president? It looks like this ship's going down,' " said Sen. Kent Conrad (D., N.D.).

About two-thirds of the farm bill would pay for nutrition programs such as food stamps and emergency food aid for the needy. An additional $40 billion is for farm subsidies, while almost $30 billion would go to farmers to idle their land and to other environmental programs.

Both the House and Senate also overwhelmingly voted to temporarily halt daily shipments of 70,000 barrels of oil to the nation's emergency reserve held in underground salt domes along the Gulf Coast - a move that Democrats have been seeking for the last year to increase supplies available for consumers. The Senate sent that measure to the president Wednesday without a single GOP objection.

In the farm bill, rising food costs put political pressure on lawmakers to boost money for food stamps and other nutrition programs. The bill's fate appeared bleak until House Speaker Nancy Pelosi intervened and forced farm-state negotiators to divert money from farm subsidies to food programs.

That brought the support of not only urban Democrats but also Republicans from all areas of the country, many of whom are growing more nervous about their reelection prospects in November.

On the oil-reserve vote, Democrats also easily won as key Republicans lent support. "In the past, I have not advocated for such a proposal, but the high cost of gasoline has fundamentally changed the equation," said Sen. Pete V. Domenici of New Mexico, the top Republican on the Energy Committee.

Bush has refused to halt the shipment of about 70,000 barrels of oil a day into the Strategic Petroleum Reserve, saying it was such a small amount that it had no effect on gas or crude oil prices.

Lawmakers acknowledged that the gesture was a small step in response to skyrocketing oil prices. Nevertheless, on Tuesday the Senate voted 97-1 to suspend the deliveries and the House followed with a vote of 385-25.

The White House has indicated that Bush will sign the reserve measure but that he will veto the farm bill. Congress has enough votes to override the veto.