Sen. John McCain returned to the U.S. Senate after being diagnosed with brain cancer on Tuesday, July 25, 2017.

WASHINGTON (AP) — Prodded by President Donald Trump, a bitterly divided Senate voted, at last, Tuesday to move forward with the Republicans' long-promised legislation to repeal and replace "Obamacare." There was high drama as Sen. John McCain returned to the Capitol for the first time after being diagnosed with brain cancer to cast a decisive "yes" vote.

The final tally was 51-50, with Vice President Mike Pence breaking the tie after two Republicans joined all 48 Democrats in voting "no."

With all senators in their seats and protesters agitating outside and briefly inside the chamber, the vote was held open at length before McCain, 80, entered the chamber. Greeted by cheers, hesmiled and dispensed hugs — but with the scars from recent surgery starkly visible on the left side of his face.

Despite voting "yes," he took a lecturing tone afterward and hardly saw success assured for the legislation after weeks of misfires, even after Tuesday's victory for Trump and Republican leader Mitch McConnell.

"If this process ends in failure, which seems likely, then let's return to regular order," McCain said as he chided Republican leaders for devising the legislation in secret along with the administration and "springing it on skeptical members."

"Stop listening to the bombastic loudmouths on the radio, TV and internet. To hell with them!" McCain said, raising his voice as he urged senators to reach for the comity of earlier times.

When the Senate voted Tuesday evening on the