WASHINGTON — Reviving their touch-and-go effort to repeal the Affordable Care Act, Senate Republicans narrowly agreed Tuesday to begin debate on an undefined health care bill that could change how millions of Americans obtain insurance.

In a dramatic showdown that required Vice President Mike Pence to break a tie vote and that prompted Republican Sen. John McCain to return to Washington days after a cancer diagnosis, the Senate agreed to start an unusual and grueling process of drafting legislation — amendment by amendment — on the Senate floor.

The 51-50 vote to begin debate was a shot of momentum for Republicans, including President Donald J. Trump, whose years-old quest to dismantle Obamacare appeared to collapse last week. But unified opposition from Democrats and discord within the GOP ranks means passage of a final bill remains an elusive target.

“This is the beginning of the end for the disaster known as Obamacare,” Trump said at a Rose Garden news conference after the vote. “Now we’re all going to sit together and we’re going to try and come up with something that’s really spectacular.”

But in an indication of just how challenging that will be, the Senate swatted down a broad Republican-drafted health care bill hours later — the first in a series of votes expected in the days ahead. Nine Republicans broke ranks and sided with Democrats against the bill.

Democrats, including Maryland Sens. Ben Cardin and Chris Van Hollen, opposed the underlying motion earlier Tuesday that allowed the debate to begin and predicted that whatever proposal emerges would include deep cuts to Medicaid as well as changes to private insurance.

“Republicans now own the uncertainty and chaos that they have injected directly into the U.S. health care system,” Cardin said. “Every Republican who voted to proceed to a phantom bill has voted to disregard the health of millions of Americans.”

Just more than 12 million Americans, including about 133,000 Marylanders, have signed up for private insurance through the marketplaces created under the Obamacare law. Another 14 million, including 288,000 in Maryland, benefit from a provision that raised the amount of money people may earn and remain eligible for Medicaid.

Many of those enrollees are facing steep premium increases and fewer choices because healthier people have been choosing not to buy insurance. In Maryland, state officials are considering a 52 percent premium increase requested by CareFirst BlueCross BlueShield, the state’s dominant insurer.

Such premium increases, Senate Majority Leader Mitch McConnell said, have kept the GOP focused on repealing President Barack Obama’s top domestic policy despite setbacks in the House and Senate.

“We’ve had to accept it for a long time. We don’t have to accept it any longer,” McConnell said. “They didn’t send us here just to do the easy stuff.”

In Maryland and other states, insurers have been clear that the uncertainty coming out of Washington is a major contributor to the proposed rate increases in the first place. Trump has threatened to undermine an unpopular requirement that Americans buy coverage or face a tax penalty, for instance — a move that could increase premiums even more.

Now, the Senate is crafting a health care bill on the fly. Advocates predicted that that would do little to bring certainty to those markets.

Vincent DeMarco, a longtime health care advocate in Maryland, described the vote as “a terrible step” toward stripping health insurance from millions of Americans and lamented that lawmakers “don’t even know what they are voting for.”

The unusual procedural approach McConnell embraced Tuesday led to an equally rare level of drama as lawmakers arrived in Washington unsure of the vote’s outcome.

Democrats sat quietly at their desks and delayed voting until all Republicans votes were tallied. Protestors chanted “Kill the bill!” and “Shame!” from the chamber’s gallery before being escorted out.

Throughout the morning, undecided Republicans steadily began to announce that they would support beginning debate. One of the holdouts, McCain, strolled on to the Senate floor to cheers from his colleagues. Returning to Capitol Hill after surgery and a recent diagnosis of brain cancer, McCain cast one of the final votes needed to start work on the bill.

The Arizona senator and former Republican presidential nominee then delivered a blistering speech that criticized the process Republican leaders used to push the repeal legislation forward and called for a more bipartisan approach to legislating.

He also appeared dismissive of his party’s chances of approving a bill under that process. “Our health care insurance system is a mess. Something has to be done,” McCain said.

“If this process ends in failure, which seems likely, let’s return to regular order,” said McCain, referring to a process by which committees craft bills and hold hearings before bringing legislation to the floor.

Two Republicans joined Democrats in opposing the motion to proceed, Sens. Susan Collins of Maine and Lisa Murkowski of Alaska. A third undecided Republican, Sen. Ron Johnson of Wisconsin, huddled at McConnell’s desk before casting a vote to start debate.

As Republicans now move toward crafting a bill, one GOP option — favored by conservatives — is to simply repeal most major parts of Obamacare, and try to pass a new health care law sometime in the future.

McConnell was expected to offer a revised version of the House-passed bill to replace Obamacare, the Better Care Reconciliation Act. The Senate rejected a procedural motion late Tuesday that would have waived the chamber's budget rules.

The lack of GOP consensus prompted Senate Republican leaders to float a new idea Tuesday: a more limited repeal bill that would target the most unpopular parts of Obamacare, including its insurance mandates. That plan — dubbed the “skinny repeal” — would eliminate the mandate requiring Americans to have coverage and large employers to offer health benefits.

Any legislation approved by the Senate would have to go back to the House, where centrist and conservative Republicans also struggled to find consensus before they approved a bill in May.

The Los Angeles Times contributed to this article.

john.fritze@baltsun.com

twitter.com/jfritze