The Republicans' effort to repeal Obamacare failed to pass the Senate early Friday morning in a 49-51 vote.

After a two-hour wait, the vote on the “skinny repeal” of the Affordable Care Act began at 1:24 a.m.

Sen. John McCain, R-Ariz., joined Sens. Susan Collins, R-Maine, and Lisa Murkowski, R-Alaska, in their vote against the bill, providing a final blow – and preventing Vice President Mike Pence, who was in the Senate chambers lobbying McCain, from casting a vote if necessary to break the tie.

“I’ve stated time and time again that one of the major failures of Obamacare was that it was rammed through Congress by Democrats on a strict party-line basis without a single Republican vote,” McCain said in a statement explaining his vote. “We should not make the mistakes of the past.”

President Donald Trump, who made repeal of the law a central part of his campaign in 2016, took to Twitter to let his displeasure be known.

"3 Republicans and 48 Democrats let the American people down. As I said from the beginning, let ObamaCare implode, then deal. Watch!" he tweeted.