WASHINGTON — The Senate narrowly defeated a bill early Friday that would repeal limited portions of Obamacare as Republican Sen. John McCain cast the deciding vote against the plan.

Senators voted 49-51 for the bill.

The vote was a major blow to GOP Senate leaders and it was not immediately clear what they would do next. House and Senate Republicans campaigned on a promise to repeal and replace the Affordable Care Act, but they have struggled to reach consensus on how to do that.

"This is a disappointment indeed," said Senate Majority Leader Mitch McConnell, R-Ky.

The non-partisan Congressional Budget Office said the bill, dubbed the Health Care Freedom Act, would result in 16 million fewer Americans with medical coverage by 2026. It also would increase premiums by about 20% for people buying their insurance in the individual marketplace every year between 2018 and 2026.

McConnell said the bill would have ended the mandates that individuals buy health insurance and that larger employers offer affordable coverage to their workers. He said it also would have provided more flexibility to states in providing medical care to low-income Americans and repeals the medical device tax for three years while increasing the amount of money that people can contribute to Health Savings Accounts.

The provision to defund Planned Parenthood drew opposition from moderate GOP Sens. Susan Collins of Maine and Lisa Murkowski of Alaska.

"The American people have suffered under Obamacare for too long," McConnell said in a speech on the Senate floor Thursday night. "It’s time to end the failed status quo. It’s time to send legislation to the president that will finally move our country beyond the failures of Obamacare. Passing this legislation will allow us to work with our colleagues in the House toward a final bill that can go to the president, repeal Obamacare, and undo its damage."

The American Medical Association immediately denounced the bill.

"The so-called 'skinny' bill is a toxic prescription that would make matters worse," said AMA President David Barbe. "Eliminating the individual mandate will lead to adverse selection, triggering higher premiums and further destabilizing the individual market. The stated goal was to advance policies to lower premiums, but the 'skinny' bill would do the exact opposite, harming patients across the country."

McCain, Lindsey Graham, R-S.C. and Ron Johnson, R-Wis., announced earlier in the evening that they would not support a "skinny repeal" bill unless they had a guarantee the House will actually start negotiations and not simply pass the Senate bill and send it to President Trump.

House Speaker Paul Ryan, R-Wis., tried to provide that assurance by saying the House would be "willing" to go to conference if that was what was required to move a bill forward. That won over Graham and Johnson, but McCain said it didn't go far enough in assuring him that the House wouldn't vote on the skinny repeal at some point.

Graham told reporters that passing a scaled-down version of a bill that would repeal Obamacare “politically would be the dumbest thing in history.”

Ryan said the Senate must vote first on whatever compromise is reached by House and Senate negotiators.

"If moving forward requires a conference committee, that is something the House is willing to do," Ryan said. "The reality, however, is that repealing and replacing Obamacare still ultimately requires the Senate to produce 51 votes for an actual plan. The House remains committed to finding a solution and working with our Senate colleagues, but the burden remains on the Senate to demonstrate that it is capable of passing something that keeps our promise, as the House has already done."

"Until the Senate can do that, we will never be able to develop a conference report that becomes law," Ryan said. "We expect the Senate to act first on whatever the conference committee produces. Obamacare is collapsing and hurting American families. We have to keep working at this until we get the job done."

Democrats remained worried that Ryan could call his members back in for a special session to vote on the skinny repeal without a conference.

Sen. Brian Schatz, D-Hawaii, said he believes Republicans will push the bill through the House and Senate and onto President Trump's desk by Sunday.

"They are desperate to enact a bill before the summertime (August recess) starts, and that is why we're all terrified here," Schatz said in a speech on the Senate floor Thursday night. "They're not going to end up in a conference committee, they're going to end up in a signing ceremony over the weekend."

House Majority Leader Kevin McCarthy, R-Calif., stoked Democrats' fears by warning members to keep their travel plans flexible.

“We now expect Senate Republicans will seek to pass Trumpcare in the dead of night and House Republicans will ... jam it through the House as early as tomorrow — with no meaningful consideration, debate or conference,” House Minority Leader Nancy Pelosi, D-Calif., said in a statement.

But not all lawmakers saw a forced vote as such a bad thing. Rep. Chris Collins, R-N.Y., who is an ally of Trump’s, told reporters that he’d rather go to conference, but if a vote was forced it wouldn’t be such a bad thing and members would eventually rally behind it.

“It would be very disappointing and I think we would pass it. I would be a 'yes' because I hate to say it’s better than nothing, but that’s kind of what it would be, better than nothing,” Collins told reporters. “If that’s what’s deemed the only thing that can pass, of course I would vote for it.”

Ryan said Thursday night, "It is now obvious that the only path ahead is for the Senate to pass the narrow legislation that it is currently considering."

"This package includes important reforms like eliminating the job-killing employer mandate and the requirement that forces people to purchase coverage they don’t want," Ryan said. "Still, it is not enough to solve the many failures of Obamacare. Senators have made clear that this is an effort to keep the process alive, not to make law."

Meanwhile, the debate unfolding on the Senate floor earlier Thursday turned into a series of “show votes” — with both parties trying to put the opposition in a tough position and nobody voting on legislation they actually think will pass.

An amendment by Montana Republican Sen. Steve Daines that would create a “single-payer” government-run health care system, a favorite of progressive senators such as Vermont's Bernie Sanders, failed Thursday afternoon on a 57-0 vote, with 43 Democrats voting "present."

The amendment was a political tactic designed to make Democrats vote against a policy popular with their base. A handful of Democrats from conservative states, including Sen. Joe Manchin of West Virginia and Heidi Heitkamp of North Dakota voted "no," but others have said they won’t participate in the health care debate anymore until they see a final version of legislation Republicans intend to offer.

“Sen. Daines doesn’t support the bill, he just wants to get Democrats on the record," Minority Leader Chuck Schumer, D-N.Y., said on the Senate floor. “All Republicans are going to vote against it. It’s just pure cynicism, pure politics. It’s not a serious effort to legislate.

The Senate rejected a Republican leadership plan to replace Obamacare on Tuesday night 43-57, with nine Republicans voting against it. And on Wednesday, a clean repeal of the health care law — with a two-year delay to come up with a replacement — failed 45-55.

Contributing: Nicole Gaudiano