Sen. John McCain said Friday he would not vote for the GOP’s latest plan to repeal and replace much of ObamaCare — dealing the effort a potentially fatal blow.

The Arizona Republican said he could not support the bill because it was not “the product of regular order in the Senate,” meaning it did not go through the usual process of committee hearings and public debate.

“That is the only way we might achieve bipartisan consensus on lasting reform, without which a policy that affects one-fifth of our economy and every single American family will be subject to reversal with every change of administration and congressional majority,” he said in a statement about the bill crafted by Sens. Lindsay Graham of South Carolina — a close friend — and Bill Cassidy of Louisiana.

“I cannot in good conscience vote for the Graham-Cassidy proposal. I would consider supporting legislation similar to that offered by my friends Senators Graham and Cassidy were it the product of extensive hearings, debate and amendment. But that has not been the case. Instead, the specter of September 30th budget reconciliation deadline has hung over this entire process.”

Senate Majority Leader Mitch McConnell wants a vote before Sept. 30, when the bill could be passed under current budget rules with only 50 GOP votes, with Vice President Mike Pence casting the tiebreaker.

After those rules expire, the bill would need 60 votes because of an assured Democratic filibuster.

McCain condemned the rush to pass the bill on a purely partisan basis.

“We should not be content to pass health care legislation on a party-line basis, as Democrats did when they rammed ObamaCare through Congress in 2009,” he said. “A bill of this impact requires a bipartisan approach.”

The Arizona Republican — who is undergoing treatment for brain cancer — said he hoped to continue working on health care reform, and cited a bipartisan effort by Sens. Lamar Alexander (R-Tenn.) and Patty Murray (D-Wash.) that they scrapped after McConnell chose the party-line law.

“Senators Alexander and Murray have been negotiating in good faith to fix some of the problems with ObamaCare. But I fear that the prospect of one last attempt at a strictly Republican bill has left the impression that their efforts cannot succeed. I hope they will resume their work should this last attempt at a partisan solution fail,” he said.

McCain also voted no on a previous incarnation of the repeal-and-replace effort, infuriating President Trump, who was desperate to fulfill a major campaign promise.