WASHINGTON (CNN) -- House Speaker Paul Ryan sensationally pulled his Obamacare repeal bill from the floor Friday, a day after President Donald Trump had threatened to walk away from health care reform if he didn't get a vote.
After a dramatic day on Capitol Hill, Ryan rushed from the White House to Capitol Hill to tell Trump he did not have the votes to pass the measure, the culmination of seven years of Republican efforts to eradicate President Barack Obama's proudest domestic achievement.
"We were very close," Trump said in the Oval Office after the bill was pulled. "It was a very, very tight margin."
As Ryan presented the dire vote totals in his meeting with Trump, he explicitly recommended the President pull the bill, according to a senior GOP official. The decision was ultimately Trump's. Trump made the call at 3 p.m., as the rest of House leadership was gathering in Ryan's office.
"We came up short," Ryan told reporters. "We are going to be living with Obamacare for the forseeable future."
Ryan told fellow Republicans they are "moving on" from health care, Reps. Andy Barr, R-Kentucky, and Bill Flores, R-Texas, told CNN. Trump said tax reform would be next.
The decision to delay the vote marks an acute embarrassment for Trump, who had gambled big by presenting holdout House conservatives with a take-it-or-leave it ultimatum on Thursday night and put his own credibility on the line.
It also puts Ryan in a much weakened political position, after being defied by his own conference, which seems just as unsuited to governing in the Trump era as it was when it was effectively a protest coalition under Obama.
It became clear during a day of intense political intrigue Friday that despite fierce arm-twisting by Trump, Ryan and other leaders that the votes simply were not there to pass the bill and the leadership and the White House were headed for a lopsided defeat.
They were unable to narrow the schism between Freedom Caucus conservatives, who believe the bill keeps too much of Obamacare intact and moderates who worry they will pay an electoral price if millions of Americans lose health insurance.
The House meltdown on Obamacare repeal has perilous implications for the American health care system, with Republicans apparently unable to repeal the law but also unwilling to fix the deficiencies that the White House says will collapse the law.
President Trump just called me. Still on phone.
"We just pulled it," he tells me.— Robert Costa (@costareports) March 24, 2017
Politically, Friday's momentous events will race like wildfire through the Republican Party's conservative, establishment base which has been told repeatedly by candidates that the first order of business with the GOP President in the White House would be the repeal of the Affordable Care Act.
Now the President may decide to go ahead with another priority -- tax reform -- yet the intricacies of that effort may be far more difficult to solve than the GOP divisions over Obamacare.
Before the vote was canceled, White House press secretary Sean Spicer said Friday afternoon that Trump has "left everything on the field when it comes to this bill."
But Republicans had few firm commitments from conservatives and watched a continued exodus of moderates. This was exactly what House leadership was worried would happen when they changed the bill, the source said.
Friday afternoon, moderate Republicans and members of the conservative Freedom Caucus have indicated they won't back the bill.
Blame game
The decision to pull the bill puts into question the state of Trump and Ryan's relationship.
Trump praised Ryan for working "very hard" on the effort and said they now plan to work on tax reform legislation.
Before the vote, the President was said to be "agitated" by the process, which he thinks is all "political," an aide said.
"We learned a lot about loyalty" during the process, Trump said Friday.
Trump maintained that "a better bill" will emerge at some point.
Freedom Caucus holding out
Vice President Mike Pence met with members of the House Freedom Caucus at the Capitol Hill Club, a source familiar with the meeting says.
Freedom Caucus members stood by their ideological objections to a bill they say does not go far enough in repealing Obamacare.
There are signs of frustration in the White House at the Freedom Caucus, which has won a series of concession but is still holding out against the bill.
"We've emboldened them," one White House aide said.
Freedom Caucus Chairman Mark Meadows, R-North Carolina, was mum about his plans. "I'm not making any comment," he said.
A Republican official involved in counting votes said it would need about 25 of the roughly 36 members of the conservative House Freedom Caucus members to back the GOP health care bill if it's going to pass Friday.
But while Mark Meadows claims lawmakers are allowed to vote their conscience, White House and GOP leadership don't think the Freedom Caucus members take that seriously.
The Freedom Caucus traditionally votes in a block and it will be hard to break from that.
Rep. Leonard Lance, R-New Jersey, said that without a doubt, the decision to concede the repeal of essential health benefits to the Freedom Caucus definitely moved some of his colleagues to "no."
"I suspect some became a no because of that," Lance said. "That certainly didn't help."
What was in the bill
The GOP health care bill would eliminate many of the taxes and eradicate the individual mandate imposed by Obamacare, officially known as the Affordable Care Act. Instead of the Obamacare subsidies that are tied to income and premiums, the GOP plan provides Americans with refundable tax credits based mainly on age to purchase health insurance.
The bill also significantly curtails federal support for Medicaid and allows states to require able-bodied adults to work. After 2020, states that expanded Medicaid would no longer receive enhanced federal funding to cover low-income adults like they did under Obamacare, and states that haven't expanded would be immediately barred from doing so.
However, the GOP bill doesn't touch some of the most popular pieces of Obamacare, including letting children stay on their parents' insurance plans until the age of 26 and including protections for people with pre-existing conditions. But it would end the requirement that insurers offer comprehensive policies that cover maternity, drugs, mental health and substance abuse.
CNN's Jeremy Diamond, Jeff Zeleny and Tami Luhby contributed to this story.