Bernie Sanders touted his universal healthcare proposal as an alternative to a collapsing Republican repeal effort on Friday, offering a preview of how divergent healthcare visions could dominate future elections.

Speaking in San Francisco before a sympathetic crowd of unionized nurses gathered for a California Nurses Association summit, the independent Senator lambasted Republics for pushing “another piece of horrific legislation” as they seek once again to unravel Barack Obama’s signature healthcare law.

The Republican push was teetering on the verge of failure Friday after Sen John McCain announced he would not support the latest bill, a move that Mr Sanders praised by saying “John McCain has a conscience, and I wish very much that the rest of the Republican leadership had that conscience as well”.

“How cruel, how immoral it is to say to those million of Americans, ‘We are going to take away that health insurance that keeps you alive”, Mr Sanders said. “We are going to defeat another proposal which is even worse than the other ones”, he added, saying Republicans who back the bill “will pay a very heavy political price”.

As Republican efforts on healthcare have faltered, Mr Sanders has steadily attracted support for a bill that seeks to extend healthcare to all Americans through Medicare, a government insurance program. He spoke in front of a large poster blaring “It’s Time to Act! Medicare for All!” and a crowd hoisting signs with the same message.

“In terms of healthcare, maintaining the status quo is just not good enough”, Mr Sanders said. “The function of a rational healthcare system is not to make billions in profit for the drug companies and the insurance companies”, he added. “The function of a rational healthcare system is to provide healthcare to all people when they need it”.

Bernie Sanders campaigns with Hillary Clinton Show all 15 1 /15 Bernie Sanders campaigns with Hillary Clinton Bernie Sanders campaigns with Hillary Clinton Democratic presidential candidate Hillary Clinton, followed by Sen. Bernie Sanders, I-Vt. arrives for a rally in Portsmouth, N.H., Tuesday, July 12, 2016. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton A woman holds a sign at an event where Bernie Sanders will appear with Hillary Clinton at Portsmouth High School July 12, 2016 in Portsmouth, New Hampshire. Sanders and Clinton are expected to show unity within the party and a forwarding of their agendas. Darren McCollester/Getty Bernie Sanders campaigns with Hillary Clinton Cerys Coffey, 5, of North Hampton, Massachusetts, walks along a line of supporters waiting to get into a campaign event with Democratic U.S. presidential candidates Hillary Clinton and Senator Bernie Sanders in Portsmouth, New Hampshire, U.S., July 12, 2016. Mary Schwalm/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic U.S. presidential candidate Hillary Clinton and Sen. Bernie Sanders stand together during a campaign rally where Sanders endorsed Clinton in Portsmouth, New Hampshire, U.S., July 12, 2016. Brian Snyder/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic U.S. presidential candidate Hillary Clinton and Sen. Bernie Sanders greet supporters during a campaign rally where Sanders endorsed Clinton in Portsmouth, New Hampshire, U.S., July 12, 2016. Brian Snyder/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic U.S. presidential candidate Hillary Clinton speaks as Senator Bernie Sanders looks on after he endorsed her during a campaign rally in Portsmouth, New Hampshire, U.S., July 12, 2016. Brian Snyder/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic U.S. presidential candidate Hillary Clinton (R) looks on as Senator Bernie Sanders endorses her during a campaign rally in Portsmouth, New Hampshire, U.S., July 12, 2016. Brian Snyder/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic U.S. presidential candidate Hillary Clinton looks on as Senator Bernie Sanders endorses her during a campaign rally in Portsmouth, New Hampshire, U.S., July 12, 2016. Brian Snyder/Reuters Bernie Sanders campaigns with Hillary Clinton Democratic presidential candidate Hillary Clinton, followed by Sen. Bernie Sanders, I-Vt., arrives for a rally in Portsmouth, N.H., Tuesday, July 12, 2016, where Sanders endorsed Clinton for president. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton Sen. Bernie Sanders, I-Vt. waves as he a Democratic presidential candidate Hillary Clinton arrive for a rally in Portsmouth, N.H., Tuesday, July 12, 2016. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton People hold signs outside an event where Bernie Sanders will appear with Hillary Clinton at Portsmouth High School July 12, 2016 in Portsmouth, New Hampshire. Sanders and Clinton are expected to show unity within the party and a forwarding of their agendas. Darren McCollester/Getty Bernie Sanders campaigns with Hillary Clinton Supporters for Democratic presidential candidates Hillary Clinton and Sen. Bernie Sanders, I-Vt. cheer before a rally in Portsmouth, N.H., Tuesday, July 12, 2016, prior to the arrival of Clinton and Sanders. Sanders is poised to offer his long-awaited endorsement of Clinton, hoping to transfer the energy of his supporters into the party's fight against Republican Donald Trump. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton Supporters of Democratic presidential candidate Hillary Clinton sing the national anthem in Portsmouth, N.H., Tuesday, July 12, 2016, prior to a rally with Democratic presidential candidates Hillary Clinton and Sen. Bernie Sanders, I-Vt. Sanders is poised to offer his long-awaited endorsement of Democratic rival Hillary Clinton, hoping to transfer the energy of his supporters into the party's fight against Republican Donald Trump. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton Supporters of Democratic presidential candidate Hillary Clinton sing the national anthem in Portsmouth, N.H., Tuesday, July 12, 2016, prior to a rally with Democratic presidential candidates Hillary Clinton and Sen. Bernie Sanders, I-Vt. Sanders is poised to offer his long-awaited endorsement of Democratic rival Hillary Clinton, hoping to transfer the energy of his supporters into the party's fight against Republican Donald Trump. Andrew Harnik/AP Bernie Sanders campaigns with Hillary Clinton A woman holds poster for Democratic presidential candidate Hillary Clinton during a rally in Portsmouth, N.H., Tuesday, July 12, 2016, where Sen. Bernie Sanders, I-Vt. endorsed her for president. Andrew Harnik/AP

Should Mr Sanders again seek the presidency, his healthcare agenda would likely be a centerpiece of his campaign. His appearance in California - following a foreign policy-oriented speech in Missouri earlier this week - has fueled speculation that Mr Sanders is laying the groundwork for another shot at the White House. Ahead of his speech, California Nurses Association Executive Director RoseAnn DeMoro led the crowd in chants of “Run Bernie, Run”!

As Mr Sanders has ascended to national prominence, California has wrestled with the same issues he champions. The Democrat-dominated state's failures to enact policies at the top of Mr Sanders’ agenda underscores the difficulty Mr Sanders faces in advancing his populist platform.

Bernie Sanders: "The Republican party is now a right-wing extremist party"

Last year, Mr Sanders threw his weight behind a California ballot initiative that sought to hold down drug prices. The proposal failed in the face of a multi-million dollar pharmaceutical industry onslaught and questions about whether the measure would work as intended.

Earlier this year, the pursuit of another coveted goal of Sanders-aligned liberals - universal healthcare - stalled in the state legislature. Leadership shelved a bill that would have instituted a single-payer healthcare system in California, noting a lack of funding made the costly proposal unlikely to work.

The decision laid bare divisions within deep-blue California’s political landscape. The California Nurses Association, the state’s leading institutional backer of Mr Sanders’ presidential bid, savaged Assembly Speaker Anthony Rendon for halting the bill and drew condemnation for tweeting an image of a knife labeled “Rendon” plunged into the back of a bear on California’s state flag.

Mr Rendon said he received death threats. Ms DeMoro went on the attack again before Mr Sanders spoke, drawing boos as she slammed Mr Rendon for using “czar-like powers to hold up the Assembly from having a vote”.

On the national level, Mr Sanders has faced skepticism over his bill to cover all Americans. As with the California bill, critics say Mr Sanders has not devised a way to pay for his proposal.

But California politicians with national profiles have increasingly embraced the idea. Lt Gov Gavin Newsom, who is running for governor, publicly proclaimed his support for single-payer healthcare while speaking to the nurses group on Friday.