WASHINGTON — Sen. John McCain said on Friday he opposes the latest Republican bill to dismantle Obamacare, dealing the measure a heavy blow, with several other Republicans still undecided on the measure.

Senate Majority Leader Mitch McConnell has been planning to bring the bill to the Senate floor for a vote next week, setting up what would be another dramatic decision on a 2010 law that President Donald Trump and his fellow Republicans have vowed to dismantle.

But the announcement by McCain, a Republican who has often been at odds with Trump and who cast a crucial “no” vote in July that helped defeat a different Republican bill to repeal Obamacare, had the potential to up-end McConnell’s plans. McConnell did not immediately respond to requests for comment.

Republicans have only a slim Senate majority and cannot afford to lose many votes on the bill, their latest attempt to dismantle a law that brought health insurance to millions of Americans and became former Democratic President Barack Obama’s signature domestic achievement.

McConnell has been trying to schedule a vote on the bill by Sept. 30, which is the last day it could pass with only a simple majority of 51 votes in the Senate. A vote taken any later than that would have to garner at least 60 votes for passage.

Republicans have long criticized Obamacare, known formally as the Affordable Care Act, as government overreach into America’s healthcare system and have been trying to repeal it for seven years, but without success thus far.

The latest bill was introduced by Republican Senators Bill Cassidy and Lindsey Graham, who is a close friend of McCain’s.

“I cannot in good conscience vote for the Graham-Cassidy proposal,” McCain said in a public statement.

McCain, who cast his “no” vote in July just days after being diagnosed with an aggressive brain cancer, said he could not support the bill without knowing how much it would cost and how it would affect insurance coverage, adding that both parties would do better to work together on legislation.

The Graham-Cassidy bill would take money spent by the U.S. government on the Medicaid program for the poor and disabled, as well as subsidies to help Americans buy private insurance, and divvy it up among states in block grants. Advocates say that would give states more discretion to manage their own healthcare schemes.

Under this plan, Alaska by 2026 would lose 38 percent of its federal funding for insurance subsidies and Medicaid, while Arizona would lose 9 percent, the Axios news website reported on Friday, citing the Centers for Medicare and Medicaid Services, a unit of the Department of Health and Human Services that oversees Medicaid and the Obamacare program.

The CMS had no immediate comment on the Axios report.

Alaska’s two Republican senators, Lisa Murkowski and Dan Sullivan, are both still on the fence over the bill.

McCain, of Arizona, is one of at least six Republican senators who either oppose the bill or whose positions are still not firm.

Rand Paul, of Kentucky, is the only other Republican senator who has publicly said he opposes the bill. Susan Collins, of Maine, said she was leaning against the bill, the Portland Press-Herald newspaper reported on Friday.