Republicans’ last-ditch effort to zap ObamaCare failed early Friday when three GOP senators joined Democrats to reject the so-called “skinny” repeal — in a vote marked by a dramatic nay from John McCain.

The Senate voted on the bill at about 1:30 a.m. just hours after it was released with the hope that it could be sent to the House and be further worked on in committee.

The defeat was the latest setback to President Trump’s promise to repeal President Obama’s signature legislative achievement.

The 51-49 vote was largely cast along party lines.

Along with McCain, who had returned to Washington from Arizona following a brain-cancer diagnosis, GOP Sens. Susan Collins of Maine and Lisa Murkowski of Alaska voted no, despite intense pressure from the White House.

Vice President Mike Pence arrived in the Senate chambers shortly after midnight in case he was needed for a tie-breaker.

Trump had rooted for the bill’s passage from the sidelines earlier in the night by sending a message via Twitter that said: “Go Republican Senators, Go! Get there after waiting for 7 years. Give America great healthcare!”

But after some wrangling on the Senate floor, it became apparent that the Republicans did not have enough votes and Pence left.

Just before McCain entered the chamber with the vote already underway, he turned to reporters and told them, “Watch the show,” according to Politico.

As he cast his “no” vote, an audible gasp could be heard from the assembly followed by cheers from Democrats.

McCain later released a statement saying, “while the amendment would have repealed some of Obamacare’s most burdensome regulations, it offered no replacement to actually reform our health care system and deliver affordable, quality health care to our citizens.

“The Speaker’s statement that the House would be ‘willing’ to go to conference does not ease my concern that this shell of a bill could be taken up and passed at any time.”

Taking the floor after the vote, Senate Majority Leader Mitch McConnell bemoaned the loss, describing it as “a disappointing moment.”

He added that it was “time to move on.”

And shortly before 2:30 a.m., Trump tweeted, “3 Republicans and 48 Democrats let the American people down. As I said from the beginning, let ObamaCare implode, then deal. Watch!”

The defeat was just the latest in a series of failures by the GOP-controlled Congress to repeal the Affordable Health Care Act.

After failing to pass even the bare-bones “skinny repeal,” it’s unclear if Republicans can advance any health bill.

The measure was a last resort for them to pass something — anything — to trigger negotiations with the House.

Some Republicans were concerned, however, that the House would simply pass the pared-down bill and send it to Trump.

Trump had repeatedly promised on the campaign trail to repeal ObamaCare “on Day One,” and considered the repeal a centerpiece of his agenda to “Make America Great Again.”

With Wires