(RNN) - Sen. John McCain has died at age 81.
The longtime Arizona politician and 2008 Republican presidential nominee was diagnosed in July 2017 with glioblastoma after he'd undergone surgery for a blood clot.
Glioblastoma, an aggressive form of brain cancer, also claimed the life of former senator Ted Kennedy.
His office said in a statement that he died Saturday at 4:28 p.m. local time at his ranch near Sedona, AZ.
McCain spent the last year undergoing cancer treatment, but his family said Friday that he would discontinue that treatment.
"In the year since (his diagnosis), John has surpassed expectations for his survival," the family said Friday. "But the progress of disease and the inexorable advance of age render their verdict."
They said he chose to stop his treatment "with his usual strength of will."
McCain's family thanked the caregivers who'd supported him and had shown him kindness, as well as the people who'd expressed their support and kept him in their prayers.
"My family is deeply appreciative of all the love and generosity you have shown us during this past year," said Meghan McCain, the senator's daughter.
McCain said in September that his doctors had given him a "very poor prognosis."
"I just said, 'I understand,'" he said during a "60 Minutes" interview. "Now, we're going to do what we can, get the best doctors we can find, and do the best we can. And at the same time, celebrate with gratitude a life well-lived."
And so began a long, difficult year for McCain and his family.
He was admitted to Walter Reed Medical Center in December after experiencing side effects from his therapy.
In April, he underwent surgery for an infection related to diverticulitis, an intestinal condition.
During his treatment, McCain kept tabs on Washington from his Arizona home, where old friends and colleagues, including former Vice President Joe Biden, visited to check up on McCain and provide support.
In December, Biden consoled Meghan McCain as she tearfully spoke of her father's illness on ABC's "The View." Biden's son Beau died in 2015 after fighting glioblastoma.
Biden held Meghan McCain's hand, telling her not to lose hope because medical breakthroughs are possible, and that if anyone could beat brain cancer, it would be her father.
Known as a "maverick" by some, the senator was often at odds with his own party.
During a vote last summer to repeal the Affordable Care Act, also known as Obamacare, McCain walked to the front of the Senate chamber and voted against repeal by giving it a thumbs down. The dramatic move shocked his fellow Republicans, who thought repeal was a done deal.
In his 2018 memoir, "The Restless Wave," he lamented the current political climate of hyperpartisanship and emphasized the importance of compromise in governance.
"Before I leave, I'd like to see our politics begin to return to the purposes and practices that distinguish our history from the history of other nations. I'd like to see us recover our sense that we are more alike than different," he wrote. "We're citizens of a republic made of shared ideals forged in a new world to replace the tribal enmities that tormented the old one. Even in times of political turmoil such as these, we share that awesome heritage and the responsibility to embrace it."
McCain was also a vocal critic of President Donald Trump, especially of his behavior toward traditional American allies and enemies abroad. He was fiercely critical of Trump's performance during a joint press conference with Russian President Vladimir Putin following a July 2018 summit with the Russian leader in Helsinki, Finland.
McCain found Putin's growing influence on the world stage particularly worrisome. In 2014, he issued repeated warnings about a resurgent Russia under Putin after the Russian takeover of Crimea. As a leader of the Armed Services and Foreign Relations committees, he was at the forefront of a group of senators who saw Putin's Russia as a growing threat to America.
He frequently criticized other Trump administration policies, including the decision to prosecute all those who illegally crossed the border to enter the U.S. – a policy which resulted in children being separated from their parents at the border.
A Vietnam POW and a known defense hawk, McCain lost his bid for the White House to Barack Obama in 2008. McCain was the first GOP nominee to select a woman to be a vice-presidential nominee, Alaska Gov. Sarah Palin.
The ticket failed to gain lasting traction in the face of an inspiring Obama campaign, especially following a financial crash in the fall of 2008 while George W. Bush was president.
It was McCain's second run at the presidency; he lost the GOP nomination to George W. Bush in 2000.
The son and grandson of Navy admirals, McCain was taught the value of civic duty from an early age.
He was born on Aug. 29, 1936, at a naval station in the Panama Canal Zone to naval officer John S. McCain Jr., and Roberta.
McCain entered the Naval Academy in 1954, soon after graduating from a prep school in Alexandria, VA.
He was shot down over Hanoi in October of 1967 while on his 23rd bombing mission inside a Skyhawk dive bomber. He ejected from the plane, which knocked him unconscious and broke both his arms and a leg. He landed in a lake in the corner of the capital of North Vietnam, he said in recalling the incident.
McCain was taken prisoner and stayed in an infamous prison known as the "Hanoi Hilton." He was held captive for more than five years.
He was given poor medical treatment by the North Vietnamese, which left McCain with lifelong injuries. He spent two years in solitary confinement, and later gave a riveting account of his time in North Vietnam.
He was released in March of 1973, along with others from a POW camp. After Vietnam, he served in the nation's capital as a naval liaison to the U.S. Senate, a body in which he would later become a fixture.
McCain retired from the Navy in 1981. His honors include the Silver Star, Bronze Star, Purple Heart, Legion of Merit and the Distinguished Flying Cross.
He was elected to the U.S. House of Representatives from Arizona in 1982 and to the U.S. Senate in 1986.
The governor of Arizona, Doug Ducey, will appoint a replacement for McCain, and by state law the appointee must be from the same party – in this case, a Republican.