Updated at 6:21 p.m. ET
The House rejected a $867 billion farm bill on Friday — after spending days negotiating with key conservatives in an attempt to pass the bill without the support of Democrats.
The vote was 198-213. Every Democrat voted against the measure, as did 30 Republicans. Many of the GOP lawmakers are members of the House Freedom Caucus and voted no after failing to get concessions on spending and a future vote on immigration in exchange for their support.
Freedom Caucus member Jim Jordan, R-Ohio, told reporters after the vote that voters elected Republicans to rein in illegal immigration and lawmakers have failed to act.
"Some members have concerns about the farm bill. but that wasn't my main focus," Jordan said. "My main focus was making sure we do immigration policy right."
The failure was an embarrassment for House leaders, who tried to pressure their members to fall in line on the farm legislation. Leaders promised conservatives a chance to vote on a hard-line immigration bill in the coming weeks, but that did not satisfy the influential bloc.
Chief Deputy Whip Patrick McHenry, R-N.C., said leaders believed they had the votes for the farm policy, but conservatives chose to wreak havoc anyway.
"We had enough members who were willing to vote yes on the farm bill," McHenry said. "[They] had a commitment on when we would vote on immigration but wanted to hijack the process to get an immigration vote before they actually fulfilled their pledge that they made to their constituents on the farm bill."
The future of the bill is uncertain. Republican leaders are discussing ways to bring it up again. A revote could hinge on whether GOP leaders agree to a vote on a controversial immigration bill that many Republican moderates oppose. Those members, many running for re-election in competitive districts, are pressing, instead, for a vote on a measure that gives a path to citizenship for children of undocumented workers.
In a statement, White House deputy press secretary Lindsay Walters said President Trump "is disappointed in the result of today's vote, and hopes the House can resolve any remaining issues in order to achieve strong work requirements and support our nation's agricultural community."
On Thursday evening, Trump tweeted his support for the farm bill.
The Freedom Caucus had extra leverage in the talks because most Democrats oppose this farm bill because of changes to food stamps.
The farm bill is generally known as the biggest safety net for millions of farmers across the country. But it also includes the Supplemental Nutrition Program — known as SNAP or food stamps. Last year, 40 million people used the program, totaling about $70 billion in spending.
Republicans and Trump want strict work requirements for people who receive those benefits, a plan Democrats reject. That left House leaders searching for conservative votes.
But conservatives oppose the amount of spending on SNAP in the bill.
The food stamp fight turned the once-bipartisan safety-net package into another contentious political battle in the House. It also pits the House against the Senate, where Republicans are working with Democrats on a compromise bill. The top GOP senator crafting that chamber's version, Pat Roberts of Kansas, has already indicated he is starting from a different framework.
House Freedom Caucus Chairman Mark Meadows, R-N.C., followed through on a threat to hold up passage of the bill until the group can extract a vote on security-focused immigration legislation by Judiciary Chairman Bob Goodlatte, R-Va. His proposal has been opposed by Democrats and would have required passage on the strength of GOP votes alone — a level of support that GOP leaders insisted the Goodlatte bill does not have on the House floor.
And conservatives, like Meadows, have turned the legislation into a last-minute election-year opportunity. They want Republicans to deliver on their promise to cut government spending.
"You know, 76 percent of this farm bill has nothing to do with farms," Meadows said in a recent appearance on C-SPAN. "When you look at that, 24 percent of it actually is about farms and supporting our farmers."
But food stamps are in the farm bill because of politics. The program was added in the 1970s as a way to persuade urban lawmakers to vote for an expensive safety net for farmers. And for decades, it worked.
That coalition is at risk of crumbling this year after House Democrats all but abandoned negotiations. Last month at a hearing on the bill, Collin Peterson, the top Democrat on the House Agriculture Committee, blamed Republicans for forcing Democrats out of the negotiations.
"I didn't walk away; we didn't walk away," Peterson said. "We were pushed away by an ideological fight I repeatedly warned the chairman not to start."
Peterson, of Minnesota, said he has worked with Republicans on every farm bill since the early 1990s. Following Friday's vote he said he was willing to work with Republicans on a bill, and deliver votes from Democrats, provided that food stamps are protected.
"If they will listen to me I can deliver a lot of Democrats on this bill," Peterson said. "If they listen to me. That's up to them. The ball is in their court."
But House Republicans had the backing of Trump on the food stamp provision. They wanted strict requirements that recipients who are healthy and able to work spend time searching for jobs — and getting training or volunteering.
And they say voters agree. Republicans point to polls from the right-leaning Foundation for Government Accountability. The group's vice president for federal affairs, Kristina Rasmussen, says the support crosses ideological lines.
"You see 7 out of 10 Democrats supporting these ideas," Rasmussen said in an interview. "Independents usually come in at 8 out of 10, Republicans 9 out of 10."
Support or no, this version of the bill would have been dead on arrival in the Senate, where Democrats have more sway.
"Regardless of what happens in the House, and I hope they can get something passed, the Senate is working toward a bipartisan bill because we have to get 60 votes," Roberts said prior to the vote.
The current farm law expires at the end of September — all but ensuring that the fight will continue right up until the next election.
NPR congressional correspondent Susan Davis contributed to this report.