Even when he's praising his spy chiefs, President Trump can't resist taking a swipe.
The instinct was on full display this past weekend, as he announced the killing of ISIS leader Abu Bakr al-Baghdadi.
"Thank you, as well, to the great intelligence professionals who helped make this very successful journey possible," he said in an address from the White House on Sunday.
His intelligence officials are ''spectacular," "great patriots," the president went on.
But then, this: "And it's really a deserving name, intelligence. I have dealt with some people that aren't very intelligent, having to do with intel."
Even while proclaiming an undisputed intelligence and military success, Trump took a moment to needle and to complain about "poor leadership" and time wasted by U.S. intelligence in the past.
Trump's hostility to the intelligence community has been relentless. He talks frequently of the "deep state" and "witch hunts" that are out to get him.
And that was all before a whistleblower complaint revealed concerns about a White House phone call with Ukraine, which has sparked the impeachment inquiry now underway. That whistleblower is reported to be a current employee of the CIA.
"It did not surprise me that ultimately an intelligence officer was the person who was going to blow the whistle on what the president did," says Leon Panetta, who was director of the CIA from 2009 to 2011 under President Barack Obama.
The current impeachment drama highlights the tension between Trump and the U.S. intelligence community. But the relationship has been tense since even before Trump took office. Over the course of his presidency, a number of notable events have strained that relationship further. Now, former intelligence chiefs warn that the president's suspicion of his spy agencies could pose a danger to U.S. national security.
On the campaign trail
This story of mistrust could have started a dozen different places.
Here's one: Sept. 26, 2016, during the first presidential debate between Donald Trump and Hillary Clinton.
"I don't think anybody knows it was Russia that broke into the DNC," then-candidate Donald Trump said, referring to the Democratic National Committee.
"I mean, it could be Russia, but it could also be China. It could also be lots of other people. It also could be somebody sitting on their bed that weighs 400 pounds, OK?" he said.
But by then, candidate Trump was already receiving classified intelligence briefings. And intelligence officials were already privately telling reporters, including me, that it was the Kremlin that hacked the servers of the DNC.
Donald Trump continued to reject this conclusion.
In November 2016, Trump was elected. And by the following January — two weeks before the inauguration and after weeks of his taking aim at U.S. intelligence — the president-elect sat down for a top-secret briefing at Trump Tower in New York City.
Director of National Intelligence James Clapper, along with the heads of the CIA, the FBI and the National Security Agency, had traveled to New York for the unenviable task of informing Trump that they were about to publish a report that said Russian leader Vladimir Putin personally ordered an influence campaign to try to help him win.
"He had great difficulty, as did his team, accepting the assertion that the Russians interfered," Clapper said in a recent interview with NPR.
While he'd been apprehensive beforehand, Clapper says the Trump Tower meeting was cordial.
"But I do think the end result was reflected in the attempt to draft a press statement while we were still there, in which they wanted to quote us as saying that the Russian interference had no impact on the outcome of the election, which we could not, did not say, we weren't chartered to assess that," Clapper says.
A few days after the Trump Tower meeting — but still before he had taken the oath of office as president — Trump tweeted a comment comparing U.S. intelligence to Nazis, when Clapper still led all 17 U.S. spy agencies.
"I was taken aback," Clapper recalls. "I was very disturbed about it, so much so that I put a call to then President-elect Trump. Amazingly enough, he took the call. And I tried to appeal to his higher instincts, I guess, by telling him that he was inheriting a treasure in the form of the national intelligence community."
An early low point
I asked Clapper to revisit this history because it shows how poisoned the well between Trump and the intelligence community was even before Donald Trump was sworn in as president. Because after that, it got worse.
Clapper recalls that he was heartened when he heard that the first place Trump was going to visit after the inauguration was the CIA.
"And I thought, well, naive me. I thought, well, perhaps my message got through to him," Clapper says. "Not so."
On Jan. 21, 2017, Trump's first full day in office — after weeks of mocking intelligence officials — the president's motorcade rolled out to CIA headquarters. He told staffers there he was now with them "a thousand percent."
"Maybe sometimes you haven't gotten the backing that you've wanted, and you're going to get so much backing," Trump told the crowd. "Maybe you're going to say please don't give us so much backing."
So far, so good. But at some point — standing in what the CIA considers sacred space, before a wall of stars representing officers who've died in the line of duty — he started saying things that were provably untrue. For instance, falsely inflating the size of the crowd at his inauguration.
The digression about the crowd size went on for a while. Ask a CIA official to name a low point in relations with this White House, and this is one of two many will point to.
"One of the most tragic moments"
Here's the other: July 16, 2018, Trump's summit with Putin in Helsinki.
During a news briefing, all the bad blood between Trump and his spy chiefs was distilled to a single question, from Jonathan Lemire, a reporter with The Associated Press.
"Just now, President Putin denied having anything to do with the election interference in 2016. Every U.S. intelligence agency has concluded that Russia did. My first question for you, sir, is who do you believe?" Lemire asked.
"My people came to me, [then Director of National Intelligence] Dan Coats came to me and some others," Trump said. "They said they think it's Russia. I have President Putin, he just said it's not Russia. I will say this. I don't see any reason why it would be."
This, says Panetta, is "one of the most tragic moments in the history of the relationship between a United States president and the intelligence community."
Panetta said his specific beef was the message Trump's words sent to the rest of the world.
"That we were dealing with a president who has no sense of the importance of intelligence and the important role our intelligence people play in protecting the security of our country," Panetta says.
"Apotheosis of what could go wrong"
One final event: Jan. 29, 2019, Room 216 of the Senate Hart Office Building.
The current director of the CIA, Gina Haspel, was testifying about Iran.
Overall, it was typical dry congressional testimony. But what was significant was that Haspel, and other officials, were stating quietly, but firmly, that at that point Iran was in compliance with the nuclear deal.
And not only on Iran, but also on Russia and North Korea, the testimony by Trump's spy chiefs was jarringly at odds with Trump's own rhetoric. So much so that the next day, Trump hit back on Twitter, calling "the Intelligence people ... passive and naïve" and adding: "Perhaps Intelligence should go back to school!"
I've thought back to that moment — the disrespect toward Haspel and her colleagues on full display — as the impeachment inquiry has blown up.
"When I heard, by the news reports, that this whistleblower is apparently a CIA employee, I just thought, my God, this is all [Haspel] needs now," John Rizzo, who worked as a CIA lawyer for 34 years, recalls.
Asked whether he saw irony in the fact that — given Trump's relationship with intelligence leaders — it's now a CIA whistleblower who appears to be bringing the country to the brink of impeachment, Rizzo says, "ironic is one way to put it."
"Honestly, I almost wish that the whistleblower had been from somewhere else in the government, not from the CIA, because, as I say, this brings the whole relationship between President Trump and the intelligence community full circle. And possibly irretrievable."
"This is the apotheosis of what could possibly go wrong to even further fracture the relationship," Rizzo says.
Complicating things further: The inspector general of the intelligence community, Michael Atkinson, has judged the whistleblower complaint both urgent and credible. But in a letter dated Aug. 26, he also writes that the whistleblower has "arguable political bias ... in favor of a rival candidate."
That prompts an obvious question: Is there a danger that the president will see that as confirmation of a deep state that is out to get him?
James Clapper believes that danger exists — and he says it could lead to national security risks.
"One risk is deeper skepticism about accepting anything the intelligence committee says, which is profoundly dangerous to the country," Clapper says. "I've thought about a situation where we had something of the magnitude of a 9/11 attack, God forbid, where he would be highly dependent on what the intelligence community can tell him. And whether he accepts that or is skeptical about it — I think that would pose real risk."
On Monday, I circled back to Clapper, who has served both Republican and Democratic presidents going back to John F. Kennedy, for his response to the news of Baghdadi's death — and to President Trump's praise for the intelligence officers who helped make it happen.
"If the Intelligence Community generates intelligence that the President likes, he praises them," Clapper wrote in response. "If it generates intelligence he doesn't like, he shoots the messengers."