WASHINGTON (Reuters) - U.S. Senator John McCain, recently diagnosed with an aggressive form of brain cancer, was given a hero’s welcome on his return to the Capitol on Tuesday, but quickly seized the opportunity to blister his party and his president for partisan politics.

Bruised and scarred from his recent surgery and flashing at times his characteristic self-deprecating humor, McCain spoke at length on the Senate floor, delivering a passionate rebuke of his fellow Republicans in Congress and an administration that has shown few results during Republican President Donald Trump’s first six months in office.

“We’re getting nothing done,” the 80-year-old senator lamented.

McCain made a dramatic return from his Arizona home to cast a critical vote to keep alive one of Trump’s top legislative priorities, the repeal of 2010’s Obamacare law, formally known as the Affordable Care Act.

McCain entered the Senate chamber to a standing ovation, with his vote helping Republicans open a floor debate, setting the stage for them to fashion a replacement for Obamacare.

After the vote, McCain took to the floor and urged his fellow Republicans to stand up to Trump, who has frequently chided the Republican-led Congress for failing to advance his agenda.

“We are not the president’s subordinates. We are his equals,” he said to a smattering of applause in the chamber.

McCain, who has served in the Senate for 30 years and ran unsuccessfully for president in 2008 against Barack Obama, has frequently criticized the Trump administration, particularly on issues of foreign policy and national security.

Most of his remarks on Tuesday, however, were directed at his fellow senators. He blasted the process through which Senate Republicans crafted their healthcare legislation, shutting out Democrats and writing the bill out of public view.

Slideshow ( 5 images )

McCain has repeatedly said that Democrats did little better in 2010, when Obamacare was passed, and added, “We shouldn’t do the same with ours.”

Democrats say they tried to work with Republicans in 2010 but could find no common ground.

No Democrat voted in favor of Senate Majority Leader Mitch McConnell’s motion to open debate on the healthcare bill on Tuesday. Two Republican senators also opposed the measure, leading to a 50-50 ballot and forcing Vice President Mike Pence to cast the tie-breaking vote.

McCain said that while he voted to start the debate, he expected the Republican efforts to repeal and replace Obamacare to fail, and received an ovation when he called on his party to work with Democrats to produce a new healthcare bill.

‘PASSION’

He also accepted some responsibility for Washington’s deep partisan divide.

“Sometimes, I’ve let my passion rule my reason,” he said. “Sometimes I made it harder to find common ground because of something harsh I said to a colleague.”

McCain called on his fellow senators to work together and to “stop listening to the bombastic loudmouths on the radio and television and the internet. To hell with them. They don’t want anything done for the public good.”

Slideshow ( 5 images )

Earlier this month, after surgery to remove a blood clot above his eye, McCain was diagnosed with a primary glioblastoma, a fast-growing type of brain tumor. He has been discussing treatment options with his medical team.

As recently as Monday, he had not been expected to be present for the Senate vote. His last-minute help to open debate on one of Trump’s major priorities was laced with irony, given that two years ago, Trump famously derided McCain’s military service and his capture during the Vietnam War.

A Navy officer, McCain spent almost six years as a prisoner of war in North Vietnam and was tortured repeatedly. In 2015, in the early weeks of his presidential campaign, Trump was dismissive of McCain’s ordeal, saying he was not a true war hero.

“He was a war hero because he was captured,” Trump said then. “I like people who weren’t captured.”

At the time, many thought Trump’s remarks might sink his fledgling campaign, but instead they became part of a pattern of attention-getting statements that helped propel him to the presidency.

Trump was more gracious on Tuesday after the news of McCain’s return to the Senate became public. “So great that John McCain is coming back to vote,” Trump tweeted. “Brave – American hero.”

McCain said that he will remain in Washington for a few days before returning to Arizona for treatment.