You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
McCain, a US senator from Arizona for over three decades, had been battling glioblastoma, an aggressive brain cancer, discovered by his doctors in July 2017, and had not been at the US Capitol in 2018. He also had surgery for an intestinal infection in April (2018).
A statement from his office said: "Senator John Sidney McCain III died at 4:28 p.m. 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 sixty years."
No further details were immediately provided.
"My heart is broken. I am so lucky to have lived the adventure of loving this incredible man for 38 years," Cindy McCain wrote on Twitter. "He passed the way he lived, on his own terms, surrounded by the people he loved, in the place he loved best."
Alternatively affable and cantankerous, McCain had been in the public eye since the 1960s, when as a naval aviator he was shot down during the Vietnam War and tortured by his North Vietnamese communist captors during 5-1/2 years as a prisoner.
He was edged out by George W. Bush for the Republican presidential nomination in 2000, but became his party's White House candidate eight years later. After gambling on political neophyte Sarah Palin as his vice presidential running mate, McCain lost in 2008 to Democrat Barack Obama, who became the first black US president.
McCain, the chairman of the Senate Armed Services Committee, was a frequent critic as well as a target of his fellow Republican Trump, who was elected president in November 2016.
McCain denounced Trump for among other things his praise of Russian President Vladimir Putin and other leaders the senator described as foreign "tyrants."
"Flattery secures his friendship, criticism his enmity," McCain said of Trump in his memoir, "The Restless Wave," which was released in May.
McCain in July had castigated Trump for his summit with Putin, issuing a statement that called their joint news conference in Helsinki "one of the most disgraceful performances by an American president in memory." He said Trump was "not only unable but unwilling to stand up to Putin."
Sources close to McCain have said Trump would not be invited to the funeral.
McCain, a foreign policy hawk with a traditional Republican view of world affairs, was admired in both parties for championing civility and compromise during an era of acrid partisanship in US politics. But he also had a famous temper and rarely shied away from a fight. He had several with Trump.
He was the central figure in one of the most dramatic moments in Congress of Trump's presidency when he returned to Washington shortly after his brain cancer diagnosis for a middle-of-the-night Senate vote in July 2017.
Still bearing a black eye and scar from surgery, McCain gave a thumbs-down signal in a vote to scuttle a Trump-backed bill that would have repealed the Obamacare healthcare law and increased the number of Americans without health insurance by millions.
After Trump in 2015 launched his presidential campaign, McCain condemned his hard-line rhetoric on illegal immigration and said Trump had "fired up the crazies." Trump retorted that McCain was "not a war hero," adding: "I like people who weren't captured."
After Trump became president, McCain blasted what he called the president's attempts to undermine the free press and rule of law, and lamented the "half-baked, spurious nationalism" of the Trump era.
McCain denounced Trump's performance at a summit meeting with Putin in July as "a tragic mistake," adding, "The damage inflicted by President Trump’s naivete, egotism, false equivalence, and sympathy for autocrats is difficult to calculate."
During the Vietnam War, McCain flew attack planes off aircraft carriers. He was preparing for a bombing run in 1967 when a missile inadvertently fired from another plane hit his fuel tanks, triggering a fatal explosion and fire. He suffered shrapnel wounds.
A few months later on Oct. 26, 1967, McCain's A-4 Skyhawk was shot down on a bombing mission over North Vietnam's capital and he suffered two broken arms and a broken leg in the crash. A mob then dragged him from a lake, broke his shoulder and stabbed him.
Held at the notorious "Hanoi Hilton" prison and other sites, McCain was beaten and tortured, suffering broken bones and dysentery. He was released on March 14, 1973, but was left with permanent infirmities.
In Congress, McCain built a generally conservative record, opposing abortion and advocating higher defense spending. He supported Bush's 2003 invasion of Iraq and criticized Obama for not doing more to intervene in Syria's civil war.
Still, he prided himself on his reputation as a maverick and had a history of working across party lines on immigration, climate change and campaign finance reform.
He also spoke out against the Bush administration's use of waterboarding, a torture technique that simulates drowning, and other harsh interrogation tactics on detainees in the aftermath of the Sept. 11, 2001, attacks.
He urged the closure of the prison for foreign terrorism suspects at the US naval base at Guantanamo Bay, Cuba, and also sponsored an anti-torture measure that passed Congress in 2005.
In a 2002 memoir, McCain wrote, "I'm an independent-minded, well-informed public servant to some. And to others, I'm a self-styled, self-righteous maverick pain in the ass."
John Sidney McCain III was born on Aug. 29, 1936, at an American naval installation in the Panama Canal Zone - US territory at the time - when his father was stationed there.
He conceded he was a "smart ass" during his years at the US Naval Academy and graduated fifth from the bottom of his class.
McCain divorced his wife Carol after 15 years of marriage in 1980 and weeks later married the former Cindy Henley, daughter of a wealthy beer distributor in Arizona.