Veteran US senator and war hero John McCain – a towering figure in American politics for decades – has died at age 81 after losing his battle with brain cancer. 

“Senator John Sidney McCain III died at 4:28pm on August 25, 2018,” his office said in a statement. “With the senator when he passed were his wife Cindy and their family.

John McCain became an outspoken critic of Donald Trump.

John McCain became an outspoken critic of Donald Trump.

AAP

“At his death, he had served the United States of America faithfully for 60 years.”

His death comes a day after his family announced he had stopped treatment for the aggressive illness. 

McCain spent more than three decades in the upper chamber of Congress, looming large in debates over war and peace and the moral direction of the nation.

The Navy fighter pilot spent years as a prisoner of war in Vietnam after being shot down while on a bombing mission over Hanoi.

John McCain is greeted by President Richard Nixon 1973 after he spending more than five years in a Vietnamese prisoner of war camp.

John McCain is greeted by President Richard Nixon 1973 after he spending more than five years in a Vietnamese prisoner of war camp.

He lost the 2008 presidential election to Barack Obama, and was pilloried for selecting controversial Alaska politician Sarah Palin as his vice presidential running-mate.

Barack Obama sent his condolences to McCain’s wife and family, praising his political rival. 

“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.

“We saw our political battles, even, as a privilege, something noble, an opportunity to serve as stewards of those high ideals at home, and to advance them around the world.”

On Friday, Republican Mitt Romney said he was “blessed and humbled” to have been friends with McCain. 

“No man this century better exemplifies honour, patriotism, service, sacrifice and country first than Senator John McCain,” he said. 

“His heroism inspires, his life shapes our character.”

Trump critic 

With no more elections to run, since 2016, he was a rare and outspoken Republican critic of President Donald Trump.

Known for his combustible temper, he accused the 45th president of “naivete,” “egotism” and of sympathising with autocrats.

John McCain ran for president twice in 2000 and 2008.

John McCain ran for president twice in 2000 and 2008.

AAP

Following Trump’s recent summit with Russian President Vladimir Putin, McCain caustically described the US leader’s behaviour as “one of the most disgraceful performances by an American president in memory.”

That earned him the ire of Trump, who regularly blamed McCain for his failure to reform Obama-era health care laws and refused to say his name when signing the eponymous “John S. McCain National Defense Authorisation Act.”