Senate Republicans came out of 20 hours of debate with a stunning failure in their efforts to overhaul the US healthcare system — and Sen. John McCain cast a decisive vote.

Early Friday morning, the Senate voted against a “skinny” plan to repeal the Affordable Care Act. Republican senators formed the last-ditch effort, called the “Health Care Freedom Act,” after earlier votes on the Senate’s healthcare plans failed.

The vote failed, with 49 voting in favour and 51 voting against. Three Republican senators — McCain, as well as Sens. Lisa Murkowski of Alaska and Susan Collins of Maine — voted no. All 48 Democrats joined them.

This vote was to replace the House bill, the American Health Care Act, with the HCFA.

The skinny bill included a series of amendments that would aim to repeal certain unpopular parts of the Affordable Care Act.

The failure left Senate Majority Leader Mitch McConnell with no clear options moving forward. The Senate has been grappling for weeks with healthcare overhaul, running through different versions of legislation before settling on the more modest attempt with the aim of moving to a conference with the House of Representatives.

In a surreal scene on the Senate floor, McConnell and Vice President Mike Pence were seen before the vote speaking with McCain. A previous vote was left open for more than 40 minutes as it appeared Republican leaders attempted to convince McCain, who made a dramatic return to the Senate this week after being diagnosed with brain cancer, to change his vote.

In announcing his vote, McCain came to the Senate floor and loudly said “no” before walking off.

“It’s time for our friends on the other side to tell us what they have in mind, and we’ll see how the American people feel about their ideas,” McConnell said after the vote, suggesting it was time to “move on” from healthcare.

Minority Leader Chuck Schumer said after the vote that he wants “turn the page” and move on to improve the ACA.

“We are not celebrating. We are relieved,” he said.

The failed vote is the end of the road for the healthcare debate in the Senate that’s been going on since Tuesday.

NOW WATCH: Briefing videos

Business Insider Emails & Alerts

Site highlights each day to your inbox.

Follow Business Insider Australia on Facebook, Twitter, LinkedIn, and Instagram.