United States Senator John McCain, who endured more than five years as a prisoner of war in Vietnam, died on Saturday after a battle with brain cancer. He was 81.

“Senator John Sidney McCain III died at 4:28pm on August 25, 2018. With the senator when he passed were his wife Cindy and their family. At his death, he had served the United States of America faithfully for 60 years,” a statement from McCain’s office read.

The long-time Republican was diagnosed with an aggressive form of brain cancer called glioblastoma in July, 2017.

The senator’s death marked the end of a 35-year political career that brought the independent-minded Republican within reach of the White House as his party’s presidential nominee.

“It’s been quite a ride,” McCain wrote in a memoir published earlier this year. 

“I’ve known great passions, seen amazing wonders, fought in a war and helped make peace. I made a small place for myself in the story of America and the history of my times.”

McCain first made headlines as a pilot during the Vietnam War. On October 26, 1967, he was flying an A-4 Skyhawk attack bomber when a missile blew off one of its wings. Badly wounded when the plane spiraled out of control and crashed, he was captured and spent more than five brutal years as a POW in North Vietnam.

He refused an early release offered to him because he was the son of a US Navy admiral as he believed his release would have been used as North Vietnamese propaganda. McCain was routinely beaten and at one point confessed to being a “black criminal” and an “air pirate,” something he remembered as a low point in his life.

He was finally released, along with other POWs, in 1973.

On Sunday, near the driveway to his ranch in a rural part of Sedona, Arizona, a sign read “Sen McCain, thank you for your service.” 

A steady stream of friends and colleagues had come to bid him farewell at his Arizona ranch in the months since his cancer diagnosis, in July 2017.

US President Donald Trump, who once mocked McCain’s war record, said he sent his “deepest sympathies and respect.”

McCain had been a rare and outspoken Republican critic of Trump, accusing him of “naivete,” “egotism” and of sympathizing with autocrats. He made a decisive vote last year that killed Republican attempts to repeal Barack Obama’s health care reforms and Trump never forgave him.

The sharp-tongued McCain had disagreements with many fellow politicians – including inside his own camp – but the Republican stalwart was widely recognized for his deep integrity, and condolences came swift from the highest reaches of American politics.

“We are all in his debt,” said former president Obama, the Democrat to whom McCain lost the presidency in 2008. 

“We shared, for all our differences, a fidelity to something higher – the ideals for which generations of Americans and immigrants alike have fought, marched and sacrificed.”

Democrat and former president Bill Clinton praised McCain for “frequently putting partisanship aside,” while his former vice-president Al Gore said he always admired how the senator “would work to find common ground, no matter how hard.”

“John McCain was a man of deep conviction and a patriot of the highest order,” said former president George W Bush.

On Capitol Hill, McCain became close friends with Senator Lindsey Graham and former senator Joe Lieberman – a trio dubbed the “Three Amigos.”

Now that the trio is missing its driving force, Graham wrote “America and Freedom have lost one of her greatest champions … And I’ve lost one of my dearest friends and mentor.”

Calling McCain a “truth-teller” with “unsurpassed” dedication to the US and its military, top Senate Democrat Chuck Schumer said he would seek to rename a Senate building in his honor.

McCain stopped receiving cancer treatment early last week, his family saying “the progress of disease and the inexorable advance of age render their verdict.”

He spent more than three decades in the Senate, looming large in debates over war and peace and the moral direction of the nation. Before joining the upper chamber, he served as a US representative from 1983 to 1987.

McCain had been away from the Senate floor since last December, remaining at his Arizona home for treatment of glioblastoma – the same form of brain cancer that took the life of another Senate giant, Democrat Ted Kennedy, in 2009.

With AFP and agencies