William Thomas Cain/Getty Images(SEDONA, Ariz.) — John Sidney McCain III, a Vietnam War hero with more than 35 years of public service and who became one of the most distinctive figures in modern American politics, died Saturday at his home in Arizona. He was 81.

A statement from Senator McCain's office Saturday night reads: "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 sixty years."

McCain announced August 24 that he had stopped receiving treatment for his glioblastoma, an aggressive brain cancer with which he was first diagnosed in July 2017, discovered during surgery to remove a blood clot above his left eye. He remained in Arizona from December 2017 onward as he fought the disease.

President Donald Trump tweeted, "My deepest sympathies and respect go out to the family of Senator John McCain. Our hearts and prayers are with you!"

In a statement, former president Barack Obama said," John McCain and I were members of different generations, came from completely different backgrounds, and competed at the highest level of politics. But 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."

Obama continued, "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. We saw this country as a place where anything is possible – and citizenship as our patriotic obligation to ensure it forever remains that way…few of us have been tested the way John once was, or required to show the kind of courage that he did. But all of us can aspire to the courage to put the greater good above our own. At John’s best, he showed us what that means. And for that, we are all in his debt."

Arizona Governor Doug Ducey has ordered that all flags in the state be lowered to half-staff "in honor and remembrance" of McCain.

Born August 29, 1936, McCain was the son of an admiral. After graduating from the U.S. Naval Academy near the bottom of his class — he would later confess to being an indifferent student when it came to subjects that didn't interest him — he became a Navy aviator and went on to a distinguished combat career in Vietnam.

October 26, 1967, McCain's aircraft was shot down over North Vietnam, beginning five-and-a-half years of captivity and torture as a prisoner of war in Hanoi, including two years in solitary confinement. Though he was offered early release for propaganda purposes, McCain refused to accept unless all prisoners captured before him were also freed. Released March 14, 1973, McCain was left permanently disabled by his torture, unable to raise his arms above his head.

“I was privileged to serve in a company of heroes," McCain told ABC News in 2007, speaking of his years in captivity. "I’ve observed a thousand acts of courage and compassion and love. And what I really found out that I wasn't dependent on myself alone. That I was dependent on others. I was a pretty arrogant, young Navy pilot. I found out that it was my comrades and my leaders who picked me up when I was down. I found out that I was human.”

McCain and his first wife, Carol Shepp McCain, divorced in 1980; McCain and Cindy Lou Hensley were married a month later and settled in Arizona. McCain retired from the Navy the following year and in 1982, won election as a Republican to the U.S. House of Representatives, replacing retiring Rep. John Rhodes, Jr. and representing Arizona's 1st congressional district. After winning re-election to the House two years later, McCain ran for and won retiring Sen. Barry Goldwater's Senate seat in 1986, which he's held ever since.

By his own admission, McCain’s long career has been marred by a few less-than-honorable chapters. In the 1980s, McCain, along with four other senators, was accused of trying to help a wealthy donor — savings and loan owner Charles Keating — hold off federal regulators, making him one of the so-called "Keating Five."

“I would very much like to think that I have never been a man whose favor could be bought,” he wrote of the scandal in his 2002 book, Worth the Fighting For. “Yet that is exactly how millions of Americans view me for a time, a time that I will forever consider one of the worst experiences of my life.”

In 1983, McCain voted against making Martin Luther King Jr.'s birthday a national holiday, a position he renounced in his 2008 presidential run. "We can be slow as well to give greatness its due, a mistake I myself made long ago when I voted against a federal holiday in memory of Dr. King. I was wrong," he said in 2008. "I was wrong, and eventually realized it in time to give full support — full support — for a state holiday in my home state of Arizona."

McCain ran for president twice, the first time in 2000 as the primary challenger to then-Texas Gov. George W. Bush. McCain withdrew from the race after a bitter primary contest that included charges of a smear campaign by his opponent. In 2008, McCain ran again against Barack Obama, this time winning the Republican nomination but losing the election by a more than 2-1 electoral college margin.

But in the crucible of that campaign, McCain’s sense of honor also shone. At a Pennsylvania town hall on the stump, he answered a woman who said she couldn’t trust Obama because “he’s an Arab” by replying, "No, ma’am. He’s a decent family man, a citizen that I just happen to have disagreements with on fundamental issues, and that’s what this campaign is all about. He is a decent person and a person that you do not have to be scared of as president.”

After his cancer diagnosis, President Obama tweeted: “John McCain is an American hero & one of the bravest fighters I've ever known. Cancer doesn't know what it's up against. Give it hell, John.”

More recently, McCain emerged as a vocal critic of President Donald Trump, who early in his presidential campaign criticized McCain, saying at an Iowa forum, “He’s not a war hero. He was a war hero because he was captured. I like people who weren’t captured.”

"If I took offense at everybody who has said something about me, or disparaged me or something like that. Life is too short. You've got to move on," McCain told CBS’ 60 Minutes in his final TV interview last October.

After Trump congratulated Putin on his election victory in March of this year, McCain scolded the president in a tweet, writing: "An American president does not lead the free world by congratulating dictators on winning sham elections.”

In a final and perhaps most memorable act of defiance against Trump and his own party, McCain took to the Senate floor on July 25, 2017 — fewer than two weeks after his brain cancer diagnosis — extended his arm and gave the thumbs-down to kill the last-ditch White House and Republican attempt to repeal Obamacare. McCain was no friend of the Affordable Care Act but felt the Republican bill would have exploded the deficit, and he cast the deciding vote on principle.

McCain’s personal affections were never partisan. Among his close friends were prominent Democratic lawmakers including Connecticut Senator Joe Lieberman, Massachusetts Senators Ted Kennedy and John Kerry, and former senator and Vice President Joe Biden of Delaware. One of his closest Republican friends and congressional allies was Senator Lindsey Graham of South Carolina.

Last October, as his health further declined, McCain spoke of his life in public service.

“I’ve had the good fortune to spend 60 years in service to this wondrous land,” he said. “It has not been perfect service, to be sure, and there were probably times when the country might have benefited from a little less of my help. But I’ve tried to deserve the privilege as best I can, and I’ve been repaid a thousand times over with adventures, with good company, and with the satisfaction of serving something more important than myself, of being a bit player in the extraordinary story of America. And I am so very grateful.”

McCain is survived by his wife, Cindy, and his seven children.

Copyright © 2018, ABC Radio. All rights reserved.