Republicans abandoned their effort to repeal ObamaCare in a stunning defeat Friday, pulling legislation that was headed for an embarrassing loss on the House floor.

President Trump asked Speaker Paul Ryan Paul Davis RyanAt indoor rally, Pence says election runs through Wisconsin Juan Williams: Breaking down the debates Peterson faces fight of his career in deep-red Minnesota district MORE (R-Wis.) to pull the measure a day after issuing an ultimatum that the House had to vote on it, a GOP aide said.

ADVERTISEMENT

The decision is a huge setback for Trump, Ryan and the GOP, which has promised for years to repeal ObamaCare.

"We are going to be living with ObamaCare for the foreseeable future," Speaker Paul Ryan (R-Wis.) said at a news conference after he met with his conference and told them the party would be moving on.

The GOP bill that was debated on the floor Friday seemed doomed to failure. The Hill's Whip List said 36 Republicans would vote no, with many more possibly voting against the measure. The GOP could only afford 22 defections.

Republicans seemed stunned by what had happened.

Ryan acknowledged the disappointment, which he initially chalked up to "growing pains" for a party that for the first time in more than a decade controls the executive and legislative branches.

“I spoke to the president a little while ago and I told him the best thing I think to do was to pull this bill and he agreed with that. I will not sugar coat this, this is a disappointing day for us. Doing big things is hard," Ryan said.

Rep. Mark Meadows (R-N.C.), the chairman of the House Freedom Caucus, declined to comment multiple times walking down a long hallway of reporters outside the GOP conference meeting.

"In our system, a constitutional republic, we try something, it might fail, we try again," Amash said. "The responsible thing is to keep working at this because it's an important issue for the American people."

But Trump, who failed to convince Freedom Caucus members to bend and warned Thursday that he would move on to other priorities if the bill was not passed, stuck to his word.

Speaking on the phone with The Washington Post's Robert Costa, Trump said that a plan to repeal and replace ObamaCare won't come up again in the near future. "He's going to let things be on healthcare, the bill is not going to come again, at least in the near future," Costa said on MSNBC Friday afternoon after Trump called him share that Republicans had pulled the bill.

The GOP bill came under fire from conservatives in the House Freedom Caucus, who demanded a number of changes that were intended to lower premium costs.

Trump and GOP leaders agreed to some of those changes, but that appeared to cost them the support of centrists.

One startling move came near midday Friday when House Appropriations Committee Chairman Rodney Frelinghuysen Rodney Procter FrelinghuysenBottom line Republican lobbying firms riding high despite uncertainty of 2020 race Ex-Rep. Frelinghuysen joins law and lobby firm MORE (R-N.J.) said publicly that he was likely to vote against the bill.

Rep. Barbara Comstock (R-Va.), who represents a district that chose Hillary Clinton Hillary Diane Rodham ClintonHillicon Valley: FBI chief says Russia is trying to interfere in election to undermine Biden | Treasury Dept. sanctions Iranian government-backed hackers The Hill's Campaign Report: Arizona shifts towards Biden | Biden prepares for drive-in town hall | New Biden ad targets Latino voters FBI chief says Russia is trying to interfere in election to undermine Biden MORE for president, also came out against the bill on Friday.

The decision to pull the vote came after Ryan met with Trump at the White House.

Jordan Fabian contributed.