The latest attempt to repeal the Obama-era healthcare act has failed after a dramatic night in the US Senate.
At least three Republicans – John McCain, Susan Collins and Lisa Murkowski – voted against the bill, which needed a simple majority to pass.
President Donald Trump said the three had “let the American people down”.
The so-called “skinny” repeal, which would have scaled back some of the more controversial provisions, is the third failed attempt to repeal Obamacare.
It would have resulted in 16 million people losing their health insurance by 2026, with insurance premiums increasing by 20%, according to the Congressional Budget Office (CBO).
What happened in the Senate?
The vote was delayed after Senate Republicans kept a procedural vote open before the actual Obamacare vote while they attempted to persuade their members to vote for the repeal.
Vice President Mike Pence was seen talking to Mr McCain for more than 20 minutes. But Mr McCain then approached a group of Democrats, who appeared happy to see him.
The bill was eventually voted down by 51 votes to 49 in the Republican-dominated Senate.
Senate Majority Leader Mitch McConnell, a Republican, described the result as a “disappointing moment”.
Democrat Chuck Schumer said his party was relieved that millions of people would retain their healthcare.
A dagger in Trump’s plans – BBC North America Correspondent Anthony Zurcher
The arc of history is long, but it bends towards revenge.
Just over two years after candidate Donald Trump mocked John McCain’s Vietnam War record, noting that he prefers heroes “who weren’t captured”, the Arizona senator stuck a dagger in President Trump’s healthcare reform plans.
There were gasps when Mr McCain, after being furiously lobbied by Vice-President Mike Pence, joined two other Republican senators in voting against the so-called “skinny” repeal plan, considered the bare minimum Senate Republicans could agree on.
Instead of a big step toward becoming law – either in its skinny form or after further negotiations with the House of Representatives – the future of Obamacare repeal has been thrown into doubt.
The reality is, for now, there is no minimum level of change on which Senate Republicans can agree. They either have to work with Democrats or resign themselves to stalemate and move on to other topics, like taxes or infrastructure spending.
It will take some time for the scale of this late-night Senate drama to sink in. No one really expected Mr McCain to be the decisive vote, but the man who once had a reputation as a Republican “maverick”, now facing a dire brain cancer diagnosis, had at least one more surprise in his pocket.
What was the ‘skinny repeal’?
The bill – officially known as the Health Care Freedom Act – would have eliminated parts of Obamacare – the Affordable Care Act – including the individual mandate requiring all Americans to have health insurance coverage or pay a fine, and the employer mandate, which requires the same of companies with 50 employees or more.
It also would have temporarily repealed a tax on medical devices, defund the US women’s group Planned Parenthood for a year and provide more money to community health centres, as well as given states more flexibility in complying with Obamacare regulations.
But the pared-down measure would have left much of Obamacare untouched, including the expansion of Medicaid, a government health programme for the poor that faced deep cuts in earlier proposals.
A requirement that all insurance plans cover essential health benefits, federal subsidies to help consumers pay for insurance as well as taxes on wealthy Americans also would have remained in place.
The stripped down bill came after earlier Senate defeats for proposals to replace Obamacare and then to partially repeal it.
Sen McCain said he had voted against the skinny repeal because it did not amount to meaningful reform and would not have improved care for Americans.
He added that House Speaker Paul Ryan’s assurance that the House would be willing to send the bill for further consideration by committee “did not ease my concern that this shell of a bill could be taken up and passed at any time”.
What now for Obamacare?
There are not thought to be any further plans for a new bill to repeal Obamacare because the skinny repeal was seen as the only measure Republicans could get through Congress.
However, lawmakers could revive the issue and take it up later in the year.
Following the vote, President Trump tweeted: “As I said from the beginning, let ObamaCare implode, then deal.”
Mr Trump’s position on healthcare reform has varied – he has spoken out at various points for Obamacare being repealed, repealed and replaced, or being allowed to collapse by itself.
In his statement, Mr McCain said Obamacare was in a state of “collapse”, with healthcare premiums “skyrocketing” and providers “fleeing the marketplace”.
He criticised the way Obamacare had been passed by Democrats using their Obama-era majority and called for senators to “return to the correct way of legislating” with input from both parties.
“We must do the hard work our citizens expect of us and deserve,” he said.
But Texas Senator Ted Cruz insisted the fight was not over.
“Mark my words, this journey is not yet done,” he said.