Updated at 9:30 p.m. with results from a vote on a measure by Texas Sen. Ted Cruz.

WASHINGTON — After months of raucous negotiations and embarrassing setbacks, GOP leaders narrowly cleared a critical hurdle on Tuesday in their quest to dismantle the Affordable Care Act.

But just hours later, the party faced an expected first defeat, as a vote to advance a version of the GOP's Better Care Reconciliation Act that included a proposal by Texas Sen. Ted Cruz failed to move forward.

GOP leaders downplayed that setback, still riding high from gaining the support of 50 Republicans to even begin debate on a health care replacement measure, a goal that has eluded Republican lawmakers in recent months as they navigated health care disagreements.

Two senators -- Susan Collins, of Maine, and Lisa Murkowski, of Alaska, voted against the motion to proceed. Vice President Mike Pence broke the tie, starting the clock on hours of debate over still-evolving health care legislation. The process will include a flurry of amendments as conservative and moderates seek to shape the bill in their favor in coming days.

"Let the voting take us where it will," Senate Majority Leader Mitch McConnell said ahead of the vote.

Democrats, meanwhile, will pitch a last ditch — but likely unsuccessful — effort to salvage President Barack Obama’s landmark health care law.

The final bill — what it will look like, how it will affect health care for millions of Americans, and whether it can win the support of a fractious GOP party — is still unknown, a point acknowledged by Cruz on Tuesday.

"At this point, it's not clear what the final product will be of all of these amendments," he said. "But I think the key to uniting Republicans is to focus on honoring our promise to the voters to repeal Obamacare and to focus critically on lowering premiums."

Tuesday's initial vote came amid boisterous chants of "shame" and “kill the bill” from protesters, with groups interrupting the proceedings before being escorted outside the Senate chamber.

Opponents of the Senate GOP's Better Care Reconciliation Act proposal — both Democrats and health care advocates — say planned reductions to Medicaid and other changes to existing health care policy will lead to millions of Americans losing or dropping health insurance coverage.

GOP defectors

With Republicans holding just a narrow 52-48 majority, and Collins and Murkowski voting against the motion to proceed, its passage was briefly in doubt as Republican lawmakers waited for Arizona Sen. John McCain and Wisconsin Sen. Ron Johnson to cast their votes.

Johnson was seen huddling with Senate Majority Leader Mitch McConnell and Majority Whip John Cornyn for several minutes before finally casting his approval. McCain, who was recently diagnosed with brain cancer, entered the chamber several minutes into the vote and received a standing ovation from his colleagues before approving the procedural step.

.@SenJohnMcCain coming injured to provide 50th vote to take up Obamacare repeal. Invokes classic Willis Reed in 1970 https://t.co/vd6lFz4G5e — Ted Cruz (@tedcruz) July 25, 2017

Support for the measure was uncertain headed into Tuesday as a handful of lawmakers expressed unease with beginning debate on a bill they didn’t fully understand or approve.

Others, including Cruz, urged GOP members to at least begin debating the legislation in a bid to make good on long-held campaign pledges to repeal Obamacare. And as its passage seemed certain, Tyler Rep. Louie Gohmert, an ally of President Donald Trump who watched the proceedings, flashed Cornyn a finger gun of approval.

{"type":"video","title":"Dallas News Video","author_name":"Dallas News","_id":"x3b2gyYzE6D-l2X7y7msnCHgrk_dQq85","provider_name":"Ooyala","html":"

","raw":"{\"type\":\"video\",\"title\":\"Dallas News Video\",\"author_name\":\"Dallas News\",\"_id\":\"x3b2gyYzE6D-l2X7y7msnCHgrk_dQq85\",\"provider_name\":\"Ooyala\",\"html\":\"\\u003Cdiv class=\\\"oo-vid-container\\\" data-oo-content-id=\\\"x3b2gyYzE6D-l2X7y7msnCHgrk_dQq85\\\"\\u003E\\u003C\\/div\\u003E\\u003Cscript defer src=\\\"https:\\/\\/www.dallasnews.com\\/resources\\/motif\\/dist\\/js\\/ooyala.js\\\"\\u003E\\u003C\\/script\\u003E\"}","providerType":"ooyala","providerLink":"https://www.dallasnews.com/oembed","embedType":"video"}

White House pressure

From the White House on Tuesday, Trump praised GOP members for moving forward with the bill, calling it a "big step." He also admonished Collins and Murkowski for voting against it, saying it was "very, very sad for them."

The president — frustrated with a stalled legislative agenda — has whipped lawmakers on Twitter in recent days. On social media on Tuesday, he urged Republicans to "step up to the plate" and tweeted that “ObamaCare is torturing the American People. The Democrats have fooled the people long enough. Repeal or Repeal & Replace! I have pen in hand.”

ObamaCare is torturing the American People.The Democrats have fooled the people long enough. Repeal or Repeal & Replace! I have pen in hand. — Donald J. Trump (@realDonaldTrump) July 25, 2017

But groups including the American Association for Retired Persons (AARP) were quick to blast the decision to proceed with the overhaul, writing that "the Senate is one step closer to passing legislation that will price gouge people over age 50 and strip health insurance from tens of millions of Americans."

The Austin-based Center for Public Policy Priorities, a left-leaning think thank, slammed Cornyn and Cruz for voting to begin debate "on a series of bills that would have such disastrous effects on some of our most vulnerable residents and cause more than 1 million Texans to lose health care."

What happens next

The vote is significant, but not yet a true victory for GOP leaders. They are now contemplating a host of amendments that will once again test their ability to reach consensus and undo the Affordable Care Act.

Lawmakers will be allowed to introduce an endless number of changes over the next few hours and days — something Cornyn hopes will assuage lawmakers who want a voice in the debate, but that could result in a hodge-podge bill that will leave GOP leaders, again, without consensus.

Under the rules of reconciliation, a procedure GOP lawmakers are using to pass the legislation, they need 50 Republican members to pass the final measure, assuming Pence again casts the deciding vote.

The Senate took its first vote on an amendment by Tuesday evening, shooting down by a 43 to 57 a measure to advance McConnell's Better Care Reconciliation Act that included provisions by Cruz and Ohio Sen. Rob Portman. It needed 60 votes to pass as both Cruz and Portman's measure hadn't been evaluated by the nonpartisan Congressional Budget Office.

Cruz's measure would allow insurers to sell bare bones health care plans as long as they also sell an ACA-compliant plan, and Portman sought to add billions in assistance for people transitioning off Medicaid.

The measure was expected to fail and was largely seen as a test of GOP members' support of various proposals. The same measures could re-emerge during the debate.

Following the late night vote, Cruz was undeterred. "This was the first step in the process," he said, adding: "I believe we will see the Consumer Freedom amendment in the legislation that is ultimately enacted."

WASHINGTON, DC - JULY 25: Sen. Ted Cruz (R-TX) walks to the Senate floor for a procedural vote on the GOP heath care plan, on Capitol Hill, July 25, 2017 in Washington, DC. The Senate voted to begin debate on a bill to repeal significant portions of the Affordable Care Act. (Photo by Drew Angerer/Getty Images) (Drew Angerer / Getty Images)

Cruz, who in recent months has sought compromise between his conservative principles and the political realities of legislating, said his proposal would lead to lower premiums for many Americans.

But experts have predicted his measure would lower premiums for those who buy the skimpier plans, but drive up costs for those who need fuller coverage.

In a new study released on Tuesday, health care consulting firm Avalere predicted premiums for ACA-compliant plans would be 39 percent higher compared to current law by 2022, but that premiums would drop as much as 77 percent for the skimpier plans. That could lead 4.1 million people dropping coverage in the individual market because of the higher costs, it predicted.

With leaders still struggling to line up enough votes to approve a wide-ranging overhaul of Obama's law, Republicans could also take up a "skinny repeal bill."

"Who knows who knows what the final bill will look like," Cornyn said, when asked to explain the thinking behind a "skinny" repeal. "I'd be happy to have a comprehensive bill that 50 senators will agree to, but if we can’t, the idea would be to come up with the core pieces that 50 of us would agree to."

No matter what the Senate passes, the measure must go to the House for negotiations on a final bill.

Health care frustration

GOP leaders are eager to move beyond the health care debate. The issue has divided Republicans in both the House and Senate and has been marked by disagreements between conservatives, who favor fully repealing the law, and moderates who oppose steep reductions in Medicaid and want to preserve pre-existing conditions protections.

The vote "is about keeping our promises, it's about demonstrating that given the majority of both houses and the presidency, we will actually govern, and it paves the way for other important legislation," Cornyn said before Tuesday's vote.

The House finally passed its American Health Care Act in May after initially aiming to approve the bill in March. McConnell urged his members to pass the Senate version before the Fourth of July recess, but those plans were scuttled due to lack of support.

The Senate's Better Care Reconciliation Act legislation — likely to change dramatically during the amendment process — would uproot much of Obama’s law, eliminate the mandates requiring people to buy insurance, reduce future Medicaid spending by hundreds of billions and provide less generous health care subsidies for consumers.

The nonpartisan Congressional Budget Office has said various versions of the legislation would mean more than 20 million Americans would become uninsured by 2026, though many Republicans have played down the accuracy of the CBO's assessments.

Staff writer Caroline Kelly and the Associated Press contributed to this report.