For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Despite a last-minute endorsement from President Donald Trump, the House on Wednesday roundly rejected a comprehensive Republican immigration bill that would have funded a border wall and sought to keep migrant families together despite prosecution. The measure also provided a pathway to citizenship for undocumented immigrants brought to the country as children—a concession hardline Republicans had vehemently opposed.

The 121-301 vote comes as a major blow to Republicans who have struggled to find common ground on the issue amid the overwhelming public outcry over the Trump administration’s immigration policy.

No Democrats voted for the bill.

Trump tweeted his support for the legislation on Wednesday morning:

HOUSE REPUBLICANS SHOULD PASS THE STRONG BUT FAIR IMMIGRATION BILL, KNOWN AS GOODLATTE II, IN THEIR AFTERNOON VOTE TODAY, EVEN THOUGH THE DEMS WON’T LET IT PASS IN THE SENATE. PASSAGE WILL SHOW THAT WE WANT STRONG BORDERS & SECURITY WHILE THE DEMS WANT OPEN BORDERS = CRIME. WIN! — Donald J. Trump (@realDonaldTrump) June 27, 2018

His backing of the bill was a complete reversal from his stance on Friday, when he urged Republicans to call off immigration negotiations until after the midterm elections. Some Republicans expressed frustration with the president’s vacillating messaging, likely contributing to the compromise bill’s failure. “I don’t understand where the administration is right now on this issue,” Rep. Mike Coffman (R-Co.) said last week.