US Republican Senator John McCain will no longer be continuing treatment for his brain cancer, his family has announced.
His family said he had "surpassed expectations for his survival" and made the choice to end his treatment.
Mr McCain, 81, was diagnosed with an aggressive brain tumour in July 2017 and had been undergoing medical treatment.
He left Washington in December, but has remained a vocal political figure.
His family said in a statement shared with US media: "Last year, Senator John McCain shared with Americans the news our family already knew: he had been diagnosed with an aggressive glioblastoma, and the prognosis was serious.
"In the year since, John has surpassed expectations for his survival. But the progress of disease and the inexorable advance of age render their verdict.
"With his usual strength of will, he has chosen to discontinue medical treatment."
The six-term senator and 2008 Republican presidential nominee was diagnosed after doctors discovered his tumour during surgery to remove a blood clot from above his left eye last July.
The son and grandson of Navy admirals, Mr McCain was a fighter pilot during the Vietnam War. When his plane was shot down, he spent more than five years as a prisoner of war.
While in the custody of his captors, he suffered torture that left him with lasting disabilities.
What's the reaction?
In a tweet, Meghan McCain, Mr McCain's daughter, said that her family "is deeply appreciative of all the love and generosity" they have received over the past year.
His wife, Cindy McCain, also said on Twitter: "I love my husband with all of my heart. God bless everyone who has cared for my husband along the journey."
Mr McCain represented his state in the Senate and House for 35 years and has been a strong voice within the Republican party.
Republican Senate leader Mitch McConnell said he was "very sad" to hear the news.
Very sad to hear this morning’s update from the family of our dear friend @SenJohnMcCain. We are so fortunate to call him our friend and colleague. John, Cindy, and the entire McCain family are in our prayers at this incredibly difficult hour.— Leader McConnell (@SenateMajLdr) August 24, 2018
House Speaker Paul Ryan said Mr McCain "personifies service to our country".
Former Republican presidential nominee Mitt Romney said "no man this century better exemplifies honour, patriotism, service, sacrifice and country first".
No man this century better exemplifies honor, patriotism, service,— Mitt Romney (@MittRomney) August 24, 2018
sacrifice, and country first than Senator John McCain. His heroism
inspires, his life shapes our character. I am blessed and humbled by
Former Secretary of State John Kerry called his fellow Vietnam veteran "a brave man".
God bless John McCain, his family, and all who love him — a brave man showing us once again what the words grace and grit really mean. https://t.co/9aiLxCF24E— John Kerry (@JohnKerry) August 24, 2018
Former Alaska governor - and Mr McCain's vice-presidential running mate - Sarah Palin said: "May my friend sense appreciation for his inspiration to serve something greater than self."
Prayers for @SenJohnMcCain and his family at this most trying time 🙏🏻 May comfort and peace envelope them. May my friend sense appreciation for his inspiration to serve something greater than self 🙏🏻🇺🇸 - Sarah Palin pic.twitter.com/5KbI3IpUel— Sarah Palin (@SarahPalinUSA) August 24, 2018
The McCain-Trump feud
Mr McCain has, at times, been a fierce critic of President Donald Trump.
Their tense relationship began in 2015, when he said then-candidate Trump had "fired up the crazies" at his rallies with controversial remarks on immigration.
Mr Trump hit back by saying Mr McCain was only considered a hero because he was a prisoner of war, adding: "I like people who weren't captured."
Last summer, Mr McCain - still facially scarred from surgery - gave a dramatic thumbs-down on the Senate floor that torpedoed a Trump-backed bill to repeal Obamacare.
Where is he now?
He left Capitol Hill last December to begin treatment at the Mayo Clinic in Phoenix, Arizona. In April, he underwent surgery again for an intestinal infection.
Mr McCain has been recovering from treatments and receiving physical therapy from a team of caregivers at his home near Sedona since leaving Washington.
He turns 82 on 29 August.
Glioblastoma is a particularly aggressive brain cancer, and increases in frequency with age, affecting more men than women.
In his memoir, released in May, Mr McCain said: "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."