Alice Ollstein contributed reporting.

Senate Republicans’ Obamacare repeal bill failed spectacularly 49-51 in a key vote that was supposed to kick off a lengthy vote-a-rama process that would have culminated in the passage of the legislation. Instead, Majority Leader Mitch McConnell pulled the bill after the gavel dropped early Friday morning.

The Republican defections were Sens. Susan Collins (R-ME), John McCain (R-AZ) and Lisa Murkowksi (R-AK).

The vote was the dramatic conclusion of Senate Republicans’ last-ditch effort to keep the repeal efforts alive for more negotiations. They were voting on a so-called “skinny bill” which would have essentially kicked the process back to the House. Instead, it collapsed.

As they streamed out of the Senate chamber around 2 a.m., GOP lawmakers were in a dark mood.

“It’s just sad,” said Sen. Ron Johnson (R-WI), who earlier on Thursday flirted with revolting against the bill. “We’re going to have to pick up the pieces and keep going, but it’s sad.”

“I’m disappointed,” Sen. Pat Toomey (R-PA) said gloomily.

Murkowksi and Collins were always considered tough votes for Republican leadership to win over, particularly after they voted against a procedural motion to open debate on the bill on Tuesday.

“This has been very difficult for all of us,” Murkowski told reporters after the vote. “We all wanted to try to get a positive outcome. It’s very disappointing we weren’t able to. Many people are feeling discouraged.”

“The failures of the ACA still exist,” Murkowski added, as a mob of reporters followed her down a narrow staircase into the Capitol’s basement. “We now have an opportunity to regroup and pull things together through an open and full committee process with bipartisan participation.”

McCain’s no vote at around 1:30 a.m. on Friday morning was a more of a surprise. He had been clearly irked by the process that Republicans were using to move the bill forward. After making a dramatic return to Washington, days after being diagnosed with brain cancer, to vote in favor in Tuesday’s procedural vote, he gave an impassioned speech imploring the Senate return to its institutional norms.

However, heading into the chamber a little after midnight Friday morning, he gave reporters no hint on how he was going to vote. Once in the chamber, he gave a few gestures to other members in there indicated he was voting no on the repeal bill.

In a statement put out after the vote, McCain called for a “return to the correct way of legislating and send the bill back to committee, hold hearings, receive input from both sides of aisle, heed the recommendations of nation’s governors, and produce a bill that finally delivers affordable health care for the American people.”

The collapse of the Senate repeal bill comes after Senate Republicans had spent months worthing behind close doors to come up with an Obamacare replacement that could pass their fractured caucus. The House passed its own Obamacare repeal bill in May, having successfully revived it after House Speaker Paul Ryan had previously pulled it from the floor due to lack of support.

The Senate effort ran into its own obstacles before Friday morning’s failure. McConnell had to delay initial plans for a vote in early July when his replacement bill did not have enough support. A revised version also fell short of support, and both it and a version of a 2015 repeal-and-delay bill failed this week in symbolic votes before McConnell was set to bring up the bare-bones repeal bill that was meant to be a vehicle back to a conference with the House.

After seven years of running on repeal and replace of the Affordable Care Act, Republicans have been unable, in the six months they gained full control of the federal government, agree an alternative that could make it to President Trump’s desk for his signature.

Friday morning’s vote is also a defeat for Trump, who, six months into office, has not yet passed a major piece of legislation.