US Senate Republicans narrowly agreed on Tuesday to open debate on a bill to end Obamacare, but the party's seven-year effort to roll back Democratic President Barack Obama's signature healthcare law still faces significant hurdles.

The senate deadlocked 50-50 on moving forward with the healthcare debate, forcing Vice President Mike Pence to cast the tie-breaking vote.

Senator John McCain, who was diagnosed this month with brain cancer and has been recovering from surgery at home in Arizona, made a dramatic return to the US Capitol to cast a crucial vote in favour of proceeding.

READ MORE: The Obamacare debate is not just about healthcare

The outcome was a huge relief for President Donald Trump, who had pushed his fellow Republicans hard in recent days to live up to the party's campaign promises to repeal the 2010 Affordable Care Act, commonly known as Obamacare. Minutes after the vote, Trump called it "a big step".

But the narrow victory on a simple procedural matter raised questions about whether Republicans can muster the votes necessary to pass any of various approaches to repeal. Moderates are worried repeal will cost low-income Americans their insurance and conservatives are angry the proposed bills do not go far enough to gut Obamacare.

Al Jazeera's Kimberly Halkett, reporting from Washington, DC, said that Trump's celebrations were a "premature victory lap".

"[It was very difficult] just to get the passage of that vote just to begin the debate - requiring a senator who has recently been diagnosed with brain cancer pivotal in getting that passed and even having the vice president being called in to break the tie," said Halkett.

"In no way is there any certainty that [Trump] will be able to deliver legislatively on his key campaign promise to repeal the Affordable Care Act."

John McCain said he voted for the motion to proceed to "allow debate to continue and amendments to be offered".

"I will not vote for the bill as it is today," he said." It's a shell of a bill right now."

'We have a duty to act'

Senators Susan Collins and Lisa Murkowski were the only Republicans to oppose the measure, and with Republicans controlling the Senate by a 52-48 majority, those were the only votes the party leadership could afford to lose. Democrats were united in opposition to the motion to proceed.

Republican Senator Ron Johnson, who cast the last and deciding vote to open debate, engaged in a heated discussion with Senate Majority Leader Mitch McConnell before casting his vote and ending the suspense.

A loss on Tuesday could have been a death blow to Republican efforts to repeal Obamacare, as well as casting doubt on Trump's prospects to achieve any of his other top legislative agenda items, including tax reform.

READ MORE: Can Muslim politicians survive in today's US?

"We have a duty to act," McConnell told senators before the vote, reminding Republicans they had promised to repeal Obamacare in four straight elections. "We can't let this moment slip by."

As the vote opened, more than two dozen protesters in the senate chamber chanted "kill the bill" before they were removed.

The senate will now launch what McConnell has promised will be a robust debate on healthcare that could include a variety of amendments.

Senators said several approaches have been discussed, including a straight repeal of Obamacare with no replacement plan, or repealing and replacing the law while also overhauling Medicaid, the federal health insurance programme for the poor and disabled.

Senate Republicans also could consider a shortened version of repeal, called a "skinny repeal," which would end the mandates in Obamacare on individuals and employers to obtain or provide health insurance, and a medical device tax, a senate aide and a lobbyist said.

"Ultimately they voted on opening debate on an amendment process - that really leaves it wide open in terms of what could look like," said Al Jazeera's Kimberly Halkett.

Halkett said there are only 40 hours of debate scheduled - including 20 hours each for the Republicans and the Democrats.

"It's very hard to see how anything constructive can be accomplished, the prospects for its success are very bleak. At the same time Democrats are digging in deep, intensifying their efforts to see that it fails," she said.