In the end it was not meant to be: Senate Republicans failed, by a single vote, to pass a month-long effort to pass Republican healthcare legislation culminating with a vote on a "skinny" bill to repeal Obamacare thanks to a single decisive vote by Donald Trump's nemesis, John McCain.

In a devastating blow to President Trump and his healthcare agenda, Senate Republicans voted 49 to 51 to pass a slimmed down bill put forward as a last gasp effort to overhaul the US healthcare system, leaving the fate of Obamacare in the hands of Democrats and the general public.

Voting shortly after midnight, John McCain – who returned to the Senate on Tuesday after undergoing emergency surgery related to brain cancer – joined known repeal holdouts, GOP Sens. Susan Collins (Maine) and Lisa Murkowski (Alaska) in opposing Health Care Freedom Act, HR 1628, the pared-down measure that would have repealed key parts of ObamaCare. Ironically, McCain cast the "no" vote two days after a dramatic return to the Senate floor during which he called on his colleagues to work together on major issues such as healthcare reform, which has long been a Senate tradition until the upsurge of partisanship in recent years.

McCain’s vote stunned many Republicans including Sen. Bill Cassidy (La.), who said he thought the Arizona Republican was in favor of the legislation. Sen. Ron Johnson (R-Wis.) told reporters, “I’m shocked at this.”

Vice President Pence was spotted lobbying McCain on the Senate floor shortly before the crucial vote. He also worked on Collins while other GOP leaders focused on Murkowski.

But those efforts fell short, as in the end it was personal for McCain, who emerged this year as one of President Trump’s most outspoken critics in Congress and the late-night healthcare vote cements his status as a maverick, a role he relished earlier in his career when President George W. Bush occupied the White House.

Senate Republican Conference Chairman John Thune (R-S.D.) said McCain was wrestling with the decision all day but in the end would not budge. “He had made up his mind and I’m not sure there was much that could have been done about it,” he said.

McCain declined to “go through my thought process” when reporters asked him about his vote. Moments later, when asked why he voted no, McCain responded "Because I thought it was the right vote."

* * *

Earlier in the night, the CBO announced that the bare-bones healthcare proposal, dubbed the “skinny” repeal because it left untouched big sections of ObamaCare, would have resulted in 16 more million people being without insurance in a decade, while boosting premiums by 20%.

“This is clearly a disappointing moment,” said a visibly choked up Senate Majority leader Mitch McConnell, who pulled the health plan after the failed vote. McConnell appeared almost distraught after McCain’s surprise vote and seemed close to choking up on the floor after falling short of his promise to repeal ObamaCare. “I regret that our efforts were simply not enough this time. Now, I imagine many of our colleagues on the other side are celebrating. Probably pretty happy about all this. But the American people are hurting, and they need relief.”

"It’s time to move on," McConnell added in remarks on Senate floor, adding that President Trump, VP Mike Pence "couldn’t have been more helpful" in effort. The majority leader said that he now he wants to hear what Democrats’ plans are "and we’ll see what the American people think about their ideas"

The failure came despite President Donald Trump’s repeated attempts to pressure his congressional counterparts into action. Some Republicans, however, pointed a finger of blame at the White House for showing insufficient leadership and limited interest in the details. Shortly after the vote, Trump condemned the three republicans who voted against the bill as "letting the American people down."

3 Republicans and 48 Democrats let the American people down. As I said from the beginning, let ObamaCare implode, then deal. Watch! — Donald J. Trump (@realDonaldTrump) July 28, 2017

Republicans had hoped to send the eight-page Health Care Freedom Act back to the House, where Speaker Paul Ryan had reportedly told senators he will have the House go to conference for further modification, instead of immediately passing the repeal as-is when it arrived back in his chamber of the legislature. But Ryan’s pledge was no guarantee that such a step would succeed in substantially altering the nature of the bill, which could still have ultimately proceeded to Mr Trump’s desk to be signed into law without any changes were it approved by enough Republicans in the House. As we noted on Thursday evening, McCain had voiced concerns over this possibility earlier in the evening.

The failed vote leaves Republicans facing a potential backlash from parts of their voter base, who have been told by lawmakers in four consecutive election cycles since 2010 that they were determined to abolish Barack Obama’s healthcare reforms. As the FT notes, Republican leaders now have the options of seeking to resurrect their plans or making a fresh start by trying modify Obamacare in collaboration with Democrats, who have acknowledged its imperfections but insist on defending its core features.