WASHINGTON — Senator John McCain of Arizona, who has been battling brain cancer for more than a year, will no longer be treated for his condition, his family announced on Friday, a sign that the Republican war hero is most likely entering his final days.

“Last summer, 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,” the family said in a statement. “With his usual strength of will, he has now chosen to discontinue medical treatment.”

Mr. McCain, 81, had been undergoing treatment since July 2017, and has been absent from Washington since December. Mr. McCain’s family has gathered in Arizona, and people close to him say his death is imminent.

From his ranch in Arizona, Mr. McCain had managed to maintain a voice in key foreign policy and military policy debates, sharply criticizing President Trump after his summit meeting with President Vladimir V. Putin of Russia, an old adversary of Mr. McCain. At home, he has welcomed close friends to renew ties. But after decades as a fixture in Washington and a larger-than-life character, he had largely retreated from the public eye.