"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.
Senators from both parties quickly wrote to comfort Mr. McCain's family and lauded his service. Senator Mitch McConnell of Kentucky, the Republican majority leader and an occasional McCain sparring partner, wrote on Twitter that Mr. McCain had been a "dear friend" with whom he was lucky to serve in the Senate.
Senator Sheldon Whitehouse, Democrat of Rhode Island, said, "May the prayers and affection of his country, and of friends around the world, surround John and his beloved family in these peaceful final hours."
The son and grandson of four-star Navy admirals who spent more than five years as a prisoner of war in Vietnam, Mr. McCain rose to become one of the towering figures in American politics, twice seeking the presidency and winning the 2008 Republican nomination for president. In the Senate, he has been both revered as an iconoclast and criticized by many, including Mr. Trump, for his willingness to buck his party on issues like campaign finance reform and, last summer, the repeal of the Affordable Care Act.
Under Mr. Trump's leadership, Mr. McCain has watched his party steer sharply away from many of the values he long championed. A fierce advocate for an expansive and interventionist American foreign policy, Mr. McCain has fretted as Mr. Trump moved the party toward "America First" policies, criticizing longtime American allies and institutions like NATO, while praising adversaries like Russia.
For decades, Mr. McCain advocated on behalf of refugees and was a leading — if intermittent — Republican voice in a handful of efforts to overhaul the American immigration system. Mr. Trump has tried to strictly limit both.
Though he was unable to vote on the Republican tax cut bill late last year, a top Trump priority, Mr. McCain's endorsement helped secure its passage.
Still, neither Mr. McCain nor Mr. Trump has held back from airing their differences, often with bruising consequences.