Updated

The House on Thursday narrowly passed a massive farm bill, after Republicans took the risky step of carving out the food stamp program -- a move Democrats effectively boycotted.

The bill passed on a 216-208 vote. Zero Democrats voted for it.

House Democrats spent most of the afternoon lambasting their Republican colleagues for dropping the food stamp component, making clear that House Speaker John Boehner would need to rely on Republicans only to pass the bill. After some marathon nose-counting, GOP leaders were able to minimize the number of Republican defectors -- just 12 Republicans voted against it on Thursday.

The farm bill historically has been a vehicle for both billions in farm subsidies and billions in food stamps. Twinning the two massive programs has in the past helped win support from rural-state lawmakers and those representing big cities. But after the bill failed in the House last month amid opposition from rank-and-file Republicans, House leaders removed the food stamp portion in a bid to attract conservative support.

The fate of the measure is unclear, though, as the matter now kicks back to the Senate or to a so-called conference committee to resolve differences between the two chambers' bills. The Democratic-led Senate overwhelmingly passed a farm bill with smaller cuts to food stamps, but would be reluctant to go along with a bill that carves out food stamps.

Senate Agriculture Committee Chairwoman Debbie Stabenow, D-Mich., said splitting the bill would be a "major mistake" -- though she has also indicated a willingness to try building off anything the House passes.

The White House has vowed to veto. A statement released overnight said that the food stamp program "is a cornerstone of our nation's food assistance safety net, and should not be left behind as the rest of the Farm Bill advances."

Though Boehner was able to hold together his own caucus, Democrats reacted furiously at the move to drop food stamps.

"It's all about denying the working poor the right to food," Rep. Jim McGovern, D-Mass., claimed, accusing Republicans of attacking "poor people."

One by one, members of the Congressional Black Caucus lined up to assail the proposal. "There are poor children in poor areas that I represent," Rep. Emanuel Cleaver, D-Mo., said.

Republicans, while concerned about the ballooning cost and enrollment in the $80 billion-a-year food stamp program, are not by any means eliminating food stamps by taking it out of the farm bill. They would instead deal with it as a separate bill.

Boehner, aside from battling Democrats, was also contending with influential conservative groups leaning on the House to reject the bill, claiming the farm subsidies are still too expensive.

"Although the bill does not contain the $750 billion in food stamp spending like (the previous bill) it does nothing to make 'meaningful reforms' to America's farm policy," the conservative Heritage Foundation, which helped kill the bill the last time, said in a statement.

House Agriculture Chairman Frank Lucas, R-Okla., said as recently as last week that he opposed splitting the bill. But he has now reluctantly agreed to the strategy, saying he would support it if his Republican leaders could deliver the votes. Late Wednesday, he gave a reserved endorsement of the plan to the GOP-controlled Rules Committee, which determines the procedures for floor debate.

"Maybe the old dynamic of how we have done things since 1965 isn't valid anymore," he said. "Maybe it is time to try something different."

The bill would also repeal laws from the 1930s and 1940s, essentially eliminating all old farm policy, which some conservatives like.

Farm-state lawmakers have kept those laws on the books so there would be incentive to pass new farm bills and avoid expiration, 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 farm programs permanent.

Fox News' Chad Pergram and The Associated Press contributed to this report.