Sen. John McCain (R-Ariz.) has been receiving treatment for brain cancer, but he revived a tense debate over torture this week by speaking out against Gina Haspel, President Trump’s nominee to lead the CIA. (Tasos Katopodis/AFP/Getty Images)

Sen. John McCain is 2,200 miles from Washington and hasn’t been on Capitol Hill in five months, but he showed this week that he remains a potent force in national politics and a polarizing figure within the Republican Party.

From his home in Sedona, Ariz., where he is receiving treatment for an aggressive and typically fatal type of brain cancer, McCain has challenged and praised the Trump administration’s actions on national security — his voice limited to news releases and Twitter.

But his declaration Wednesday in opposition to Gina Haspel, President Trump’s nominee for CIA director, has uniquely roiled the political scene. The denunciation has prompted reactions from fellow senators and a former vice president, as well as intemperate remarks from some Republicans aligned with Trump, including a White House aide.

It has revived the fierce debate over torture and its effectiveness in extracting information in the years since the Sept. 11 terrorist attacks — from a man who speaks from experience. McCain was held for 5½ years in a North Vietnamese prison, often deprived of sleep, food and medical care, after a jet he piloted was shot down over Hanoi.

And while McCain is not expected to cast a vote, his opposition to Haspel — based on her record overseeing controversial CIA interrogations of suspected terrorists — has injected uncertainty into her confirmation.

As Republicans and Democrats come to grips with a Senate without him, McCain has remained in Arizona, receiving visitors on the deck of his cabin.

Sen. Lindsey O. Graham (R-S.C.), one of McCain’s closest friends, returned this week from an extended visit there and described his outlook: “One foot in front of the other.”

“We’re talking about the future,” Graham added. “We talk about what’s going on in the Mideast. I was pleasantly surprised [by his vigor], and I’m looking forward to going back.”

But there is little expectation on Capitol Hill that McCain, 81, will ever return to his old haunt as elder statesman, jet-setting diplomat, military expert and conscience of the Republican Party. That is the subtext of his forthcoming book, “The Restless Wave,” an elegiac volume set for release later this month in which McCain recounts and defends his efforts to expose and prevent torture, combat Russian expansionism and advance the postwar international order.

“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,” he writes. “I would like to see us recover our sense that we are more alike than different. We are 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 also questions Trump more directly in the book, acknowledging “glimmers of hope” in his foreign policy but expressing grave doubts about Trump himself.

“I’m not sure what to make of President Trump’s convictions,” he writes, adding, “The appearance of toughness or a reality show facsimile of toughness seems to matter more than any of our values.”

McCain’s illness has added gravity to his opposition to Haspel, who as a senior CIA official during the post-9/11 war on terrorism oversaw “enhanced interrogations” of terrorism suspects that some — including McCain — have described as torture.

During a confirmation hearing Wednesday, Haspel pledged that she would never allow the CIA to engage in those types of interrogations under her watch. But she repeatedly declined to characterize the CIA’s previous interrogation methods as immoral, saying they were authorized under the law.

The same day, former vice president Richard B. Cheney — the leading proponent of the interrogation techniques inside the George W. Bush administration — told the Fox Business Network that the CIA’s actions did not amount to torture. He also argued, in contradiction of a Senate report on the issue, that “it worked.”

“If it was my call,” he said, “I’d do it again.”

Hours later, McCain issued a statement declaring that “the methods we employ to keep our nation safe must be as right and just as the values we aspire to live up to and promote in the world.”

“I believe Gina Haspel is a patriot who loves our country and has devoted her professional life to its service and defense,” he said. “However, Ms. Haspel’s role in overseeing the use of torture by Americans is disturbing. Her refusal to acknowledge torture’s immorality is disqualifying.”

That denunciation infuriated some Republicans who have seen McCain as a motivated opponent of Trump and have moved away from the more idealistic strain of conservatism that McCain, the 2008 GOP presidential nominee, has embodied.

The Washington Post and other media outlets reported Thursday that Kelly Sadler, a White House communications official, dismissed McCain’s opposition in a staff meeting, saying, “It doesn’t matter; he’s dying, anyway.”

The White House has not disputed the report. “I’m not going to comment on an internal staff meeting,” press secretary Sarah Huckabee Sanders said Friday.

Separately Thursday, retired Air Force Gen. Thomas McInerney said during an appearance on the Fox Business Network that torture “worked on John” during McCain’s years in captivity. “That’s why they call him ‘Songbird John,’ ” McInerney said.

Neither Sadler nor McInerney has publicly apologized. Independent accounts of McCain’s time in North Vietnamese captivity do not include any suggestion that he offered material information to his captors, and McCain says the same. He did, by multiple accounts, refuse offers of early release based on his status as the son of a Navy admiral.

His defense fell to his family and some of his old friends in Washington. His wife, Cindy, tweeted a rebuke at Sadler, and daughter Meghan addressed the attacks during Friday’s broadcast of “The View,” the ABC daytime talk show she co-hosts.

“I don’t understand what kind of environment you’re working in when that would be acceptable, and then you can come to work the next day and still have a job,” she said.

She added: “My father’s legacy is going to be talked about for hundreds and hundreds of years. These people? Nothingburgers. Nobody’s going to remember you.”

Former vice president Joe Biden issued a sharp statement, accusing the Trump administration of hitting “rock bottom.”

“John McCain is a genuine hero — a man of valor whose sacrifices for his country are immeasurable,” he said. “As he fights for his life, he deserves better — so much better.”

It is possible, though unlikely, that McCain’s opposition to Haspel’s nomination could sink her prospects for confirmation. Most Democrats have opposed her appointment; Sens. Tim Kaine (D-Va.) and Robert Menendez (D-N.J.) both cited McCain in announcing their opposition to Haspel on Friday.

Several senators have yet to announce their intentions, and one key vote belongs to Arizona’s junior senator, Republican Jeff Flake, who recently visited McCain in Sedona and said Thursday that McCain’s words were weighing heavily on his decision.

“I’ve always shared McCain’s views on torture and looked up to him on this,” he said.

Sean Sullivan, Seung Min Kim and Karoun Demirjian contributed to this report.