President Obama arrived at CIA headquarters Wednesday for the fourth and probably final visit of his presidency to an agency that regarded him with significant apprehension when he first came to Langley in 2009.

The apprehension now is over who might be the next president to visit, particularly if it is Donald Trump.

The CIA tends to lie low during presidential election cycles, out of respect for its apolitical mission as well as a reluctance to alienate any potential commander in chief. But the Trump candidacy has triggered an unusual public outcry among CIA officers and surrogates.

CIA Director John Brennan was the latest to weigh in, saying during an NBC News appearance that the agency would never resume the use of waterboarding and other brutal interrogation techniques, even if ordered to do so by a future president.

“I will not agree to carry out some of these tactics and techniques I’ve heard bandied about because this institution needs to endure,” Brennan said. He didn’t cite Trump by name, but the brash Republican candidate is the only one who has repeatedly endorsed waterboarding and said it should be reinstated as a tactic to get terrorism suspects to talk.

Agency veterans have threatened similar disobedience. Former CIA director Michael V. Hayden has said that if the next president wants terrorism suspects strapped to the waterboard, he will need to bring his “own damn bucket.”

But the alarm about Trump goes beyond his apparent enthusiasm for the simulated drowning technique. “There would definitely be concern about Trump being elected and not having a clear understanding of foreign policy and national security,” said Nada Bakos, a former CIA counterterrorism analyst. Trump’s rhetoric, she said, “probably gives some people major heartburn.”

Aerial of CIA headquarters in Virginia (Photo by Carol M. Highsmith/Buyenlarge/Getty Images)

Trump has seemed at times to back away from his apparent enthusiasm for interrogation methods widely condemned as torture, saying that he would not order agency operatives to break the law. He has also consulted, at least informally, with CIA veterans who opposed the interrogation program, including former CIA director David H. Petraeus.

But after Brennan’s comments, Trump seemed to double down. He called Brennan’s refusal to use waterboarding “ridiculous” given that Islamic State terrorists “chop off heads.”

The tone of the debate is in sharp contrast with eight years ago, when the CIA was bracing for what many expected to be a grim era under Obama, who denounced the secret interrogation program during his campaign and seemed poised to rein in the agency’s authority and influence.

Instead, Obama frequently sided with the CIA in bureaucratic battles, escalated its drone war against al-Qaeda and counted on the agency for signature aspects of his legacy, including the death of Osama bin Laden.

Obama’s first trip to the CIA in April 2009 was largely aimed at reassuring a wary workforce after the White House released legal memos that had authorized interrogation methods now deemed torture. But he also signaled that the agency’s fate might be better than it feared.

“Don’t be discouraged that we have to acknowledge potentially we’ve made some mistakes,” Obama said. “We live in dangerous times. I am going to need you more than ever.”