Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — Sen. John McCain announced on Friday that he'll vote against the Graham-Cassidy Republican health care bill, putting the future of the legislation in peril.

McCain complained about the process, criticizing the lack of debate and committee time for legislation that would remake the country's health care system.

I cannot in good conscience vote for Graham-Cassidy. A bill impacting so many lives deserves a bipartisan approach. https://t.co/2sDjhw6Era pic.twitter.com/30OWezQpLg — John McCain (@SenJohnMcCain) September 22, 2017

"Committees of jurisdiction should mark up legislation with input from all committee members, and send their bill to the floor for debate and amendment," McCain said in a statement.

"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."

McCain was one of three votes that helped to sink the Republican effort in late July, just days after he was diagnosed with an aggressive form of brain cancer. He criticized the closed-door process then, too.

McCain’s surprise Friday afternoon announcement, coupled with statements of opposition by Sen. Rand Paul, R-Ky., means Republicans can’t lose another vote as only two Republicans can defect in order for the legislation to pass. All eyes now turn to GOP Sens. Lisa Murkowski of Alaska and Susan Collins of Maine, both of whom recently voted against the so-called "skinny repeal" bill and say they are undecided on the latest measure.

McCain's opposition goes against one of his closest confidantes, Sen. Lindsey Graham, R-S.C., who has been championing this latest effort.

"I take no pleasure in announcing my opposition. Far From it," McCain wrote in a statement. "The bill’s authors are my dear friends, and I think the world of them. I know they are acting consistently with their beliefs and sense of what is best for the country. So am I."

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Graham tweeted his reaction to McCain's decision, saying that he supports his friend but that he still thinks his legislation is the best option to repeal Obamacare.

My friendship with @SenJohnMcCain is not based on how he votes but respect for how he’s lived his life and the person he is. — Lindsey Graham (@LindseyGrahamSC) September 22, 2017

I’m excited about solutions we have found in Graham-Cassidy-Heller-Johnson. We press on. — Lindsey Graham (@LindseyGrahamSC) September 22, 2017

Cassidy said he's "disappointed" by McCain's decision.

"I am disappointed that Senator John McCain is not voting to repeal and replace Obamacare. But, as long as there are families being penalized because they can’t afford insurance costing $30,000 to $40,000 a year, I will continue to work for those families," Cassidy wrote in a statement.

"President Trump and I firmly believe the Graham-Cassidy bill is the right bill, at the right time to repeal and replace Obamacare," Vice President Mike Pence told a crowd gathered in Anderson, Indiana, where he was promoting tax reform.

"It’s time for every member of the Republican majority to keep their word to the American people,” Pence added, reminding that Republicans were "not elected to save Obamacare, they were elected to repeal and replace it."

McCain was praised, however, by Senate Minority Leader Chuck Schumer, D-N.Y.

"John McCain shows the same courage in Congress that he showed when he was a naval aviator. I have assured Senator McCain that as soon as repeal is off the table, we Democrats are intent on resuming the bipartisan process," Schumer said.

Senate Majority Leader Mitch McConnell, R-Ky., has said he intends to put the bill on the floor next week. But he might choose not to if he doesn't have 50 votes.

The last-ditch effort to partially repeal and replace the Affordable Care Act gained steam last week when Graham and Sen. Bill Cassidy, R-La., introduced the text of their legislation and sent it to the nonpartisan Congressional Budget Office for an analysis.

Late night host Jimmy Kimmel, who has attacked Cassidy three nights in a row this week, tweeted his thanks to McCain shortly after the announcement.

Thank you @SenJohnMcCain for being a hero again and again and now AGAIN — Jimmy Kimmel (@jimmykimmel) September 22, 2017

RELATED: Kimmel urges defeat of GOP health care bill

The Graham-Cassidy legislation has been sharply criticized by Democrats, health care experts and the health care industry, including the insurance industry. Studies have shown that states will lose upwards of $200 billion dollars of health care funding, millions fewer will be covered, and the changes would severely disrupt the health care market.

Graham-Cassidy would cut the Medicaid program by ending the Obamacare expansion, which insured an additional 17 million Americans, by 2020. It would also change the funding formula for Medicaid to be based on population instead of need. And it would provide a chunk of money to states to implement their own Medicaid program, known as a block-grant.

Sen. Bill Cassidy, R-La., left, and Sen. Lindsey Graham, R-S.C., talk while walking to a meeting on Capitol Hill in Washington on July 13, 2017. Pablo Martinez Monsivais / AP file

In addition, the bill would get rid of the mandate to purchase health insurance and end the subsidies that helps people purchase coverage. It would also take money given to the states that expanded Medicaid and the money for subsidies and give it to states to implement their own health system. In doing so it would allow states to undercut protections for people with pre-existing conditions, likely causing their insurance premiums to rise.

Republicans have only until September 30 before the legislation expires that allows them to try and pass it with a simple majority, forcing the rushed timeline on a bill that was introduced just days ago.

Anxious for a legislative victory, President Donald Trump has been publicly pressuring congressional Republicans to repeal Obamacare.

Rand Paul, or whoever votes against Hcare Bill, will forever (future political campaigns) be known as "the Republican who saved ObamaCare." — Donald J. Trump (@realDonaldTrump) September 22, 2017

Trump's attacks weren't enough to convince McCain and haven't been enough yet to convince Paul, either. Collins told the Portland Press Herald on Friday that she's leaning toward voting against the measure. Her concerns are plenty, including the bill's impact on pre-existing conditions, defunding of Planned Parenthood and the legislative process.

Murkowski said she also has concerns with the fast-moving process and that she wants to know how the legislation will impact Alaska, a rural state with a large Medicaid population and expensive health care.