House Republicans failed to pass a compromise immigration bill in the face of President Donald Trump’s wavering support on Wednesday evening.

With only 121 Republicans voting in favor, the bill failed to meet the 218 votes it needed to pass.  What was more surprising to House members was the number of Republicans who voted against the GOP-backed bill, 112. 

SLIDESHOW: DONALD TRUMP’S 30 CRAZIEST TWEETS

“A minority of Republicans joined every Democrat to vote for the status quo,” said Rep. Carlos Curbelo (R-Fla.). “They prefer petty politics of immigration instead of the solutions for immigration.”

50 Celebrities Who Have Died In 2018 – Tribute Slideshow

Many speculate that the bill’s lack of partisan support may be due to president’s erratic attitude leading up to the deciding vote. In an initial interview with Fox News, Trump claimed that he would not back the immigration bill, only to later put out a statement that he would back it. Last Friday, the president tweeted that Republicans should not “waste their time” on the bill and should instead wait until after midterm elections to take action.

Hours before the vote, the president suddenly threw his support behind the bill again.

The last ditch effort found little success as some conservatives reported being hesitant to go against their base by voting in favor of the compromise without strong presidential support.

“This only works if Trump’s behind us,” one member said. “No use sticking out our necks if the bill’s going to fail.”

The compromise bill would have earmarked roughly $25 billion for Trump’s border wall, limited legal and illegal immigration, provided protection from deportation and a path to citizenship for 1.8 million Dreamers, and keep undocumented families together who had crossed the border if the parents were facing prosecution.

On Tuesday, Speaker Paul Ryan said that if the compromise bill fails, the House would likely pursue a narrow bill to address the family separation issue at the border.