WASHINGTON — With a crucial vote from ailing Sen. John McCain, Senate Republicans narrowly passed a motion to open debate on Obamacare repeal legislation, starting a process that still must overcome several political and procedural obstacles.

As protesters chanted to “kill the bill” and “shame” before being cleared from the gallery, 50 of the 52 Republican senators voted to move ahead on the still-developing measure, requiring Vice President Mike Pence to cast the tiebreaking vote.

The vote set in motion 20 hours of debate and an expected raft of amendments from both sides, as Senate Majority Leader Mitch McConnell (R-Ky.) faced division in his caucus and Senate Minority Leader Chuck Schumer (D-N.Y.) vowed to fight passage of a bill.

“This is just the beginning. We’re not out here to spike the football,” McConnell told reporters after the vote. “This is a long way, but we’ll finish at the end of the week hopefully with a measure that can go to the House and be taken up or go to conference.”

Schumer predicted a rough road for McConnell in pushing the measure through a budget reconciliation process that allows Republicans to avoid having to corral the 60 votes to end a filibuster and pass a bill with a simple majority.

“Anyone who thinks this is over is sadly mistaken,” Schumer said as debate began.

advertisement | advertise on newsday

“There are many, many Republicans who don’t like this bill,” said Schumer. “We’re going to do everything we can in this chamber . . . to make sure that this does not pass the Senate.”

Before the dramatic showdown vote, President Donald Trump launched a string of tweets to put pressure on senators in his party. But Sen. Susan Collins (R-Maine) and Sen. Lisa Murkowski (R-Alaska) still voted no, joining the 48 Democratic caucus members.

McCain (R-Ariz.) made the victory possible by flying to Washington to vote for the motion despite having had a blood clot removed and being diagnosed last week with brain cancer. His Senate colleagues greeted him with a standing ovation as he gave the thumbs up for the motion.

After the vote, Trump tweeted, “@SenJohnMcCain-Thank you for coming to D.C. for such a vital vote. Congrats to all Rep. We can now deliver grt health care to all Americans!”

In the first speech in the debate, McCain thanked his colleagues for their support but then scolded both Republicans and Democrats for failing to work together, criticized McConnell for crafting a bill in secret with no hearing or Democratic input. He warned the bill could fail.

“I will not vote for this bill as it is today,” he said, saying the legislation would have to include changes urged by Republican Arizona Gov. Doug Ducey. “I know many of you will have to see the bill change . . . substantially for you to support it.”

To start the process, McConnell introduced the House version of the health bill and then an amendment to substitute the Obamacare repeal bill that the Republican Congress passed in 2015. President Barack Obama vetoed the measure.

Late Tuesday evening, McConnell lost, as expected, a vote on an amendment containing a repeal and replace Obamacare bill that included a Sen. Ted Cruz (R-Tex.) plan to allow sale of skimpy health plans and a Sen. Rob Portman (R-Ohio) proposal to add $100 billion for states.

But facing a divided membership, McConnell is considering a fallback position being called a “skinny repeal” of Obamacare. The proposal would end insurance mandates and roll back taxes on medical devices, according to several reports.

McConnell said he could not say what the final bill would look like, saying in an open amendment process it’s “impossible to predict” what amendments will be offered or approved.