WASHINGTON — Republicans pushed a scaled-down farm bill through the House on Thursday, putting off a fight over food stamp spending and giving GOP leaders a victory after a decisive defeat on the larger bill last month.

Republicans faced significant opposition to the plan from Democrats, farm groups and conservative groups that threatened to use the vote against GOP members in future campaigns. But Majority Leader Eric Cantor, R-Va., navigated his colleagues to a narrow 216-208 vote by convincing Republican members that this was the best chance to get the bill passed and erase the embarrassment of the June loss.

Any other path to passage would have most likely included concessions to Democrats who opposed the original bill.

Last month 62 Republicans voted against a broader bill after House Speaker John Boehner, R-Ohio, and Cantor supported it. Only 12 Republicans voted against the new measure, and no Democrats voted for it.

Republicans said the food stamp part of the legislation would be dealt with separately at a later date, and Cantor said after the vote that Republicans would “act with dispatch” to get that legislation to the floor. That bill is expected to make cuts much deeper than the original bill, which trimmed around 3 percent, or about $2 billion a year, from the $80 billion-a-year feeding program.

Many Republicans had said the cut wasn’t enough since the program’s cost has doubled in the last five years. Democrats have opposed any cuts. The food stamp program doesn’t need legislation to continue, but Congress would have to pass a bill to enact changes.

Dropping the food stamps drops the cost of the farm bill from $100 billion a year to about $20 billion a year.

The measure passed Thursday would cut farm program spending by about $1.3 billion a year and is almost identical to the larger bill defeated last month, except for the dropped food stamp language. It includes one new provision that repeals laws from the 1930s and 1940s that kick in when current farm law expires. Farm-state lawmakers have kept those laws on the books so there would be incentive to pass new farm bills, but the threat of outdated policies kicking in has been a headache for farmers who worry they can’t depend on Congress to create new laws or extend more recent versions of the law.

Repealing those decades-old laws could mean that Congress would have little incentive to create new farm bills, however, and could make many of the new farm programs permanent.

The bill would also expand government subsidies for crop insurance, rice and peanuts, and eliminate subsidies that are paid whether a recipient farms or not.

During debate Thursday, House Democrats called for a series of procedural votes to delay a vote. They painted the legislation as taking food stamps away from the hungry.

Late Wednesday, President Barack Obama had threatened to veto the House bill if reached his desk.

In voting for the bill, conservative lawmakers made the unusual move of bucking the conservative groups Club for Growth and Heritage Action, both of which said they would use a “yes” vote against Republicans in future campaigns. While those groups originally supported the idea of dropping food stamps and taking that part of the bill up separately, they later said the GOP idea was a ruse to get the bill in conference with the Democrat-led Senate, where food stamps will be added back in with smaller cuts.

The Senate overwhelmingly passed a farm bill last month with only a half-percent cut to food stamps and would be reluctant to go along with a split bill or further cuts to the programs. After House passage, Senate Agriculture Chairwoman Debbie Stabenow, D-Mich., called the bill “an insult to rural America.”

House and Senate negotiators will have to resolve differences between the two bills.

Splitting the popular farm bill from the controversial food stamp cuts and releasing the bill’s text at 8 p.m. on the eve of Thursday’s scheduled vote denied conservatives the time to rally opposition. But the bill’s prospects remained a tense question through the day.

Before the vote, Boehner acknowledged that the process was unusual but said, “My goal right now is to get a farm bill passed.”

The White House agreed that food stamps should not be left out of the bill. The Obama administration had also threatened to veto the original bill, saying it did not include enough reductions to farm subsidies and the food stamp cuts were too severe.

Farm groups and anti-hunger groups have warned that separating the farm and nutrition programs after linking them since the 1970s would be misguided. Rural lawmakers have long added money for food stamps to the farm bill, which sets policy for agricultural subsidies and other farm programs, to gather urban votes for the measure.

The vote was a welcome victory for Republicans, who have struggled to bring their majority together on even bigger issues like immigration and the budget.

“Thank God, we can do something!” exclaimed Rep. Tom Rooney R-Fla., as he walked off the floor after the final vote.