WASHINGTON (NYTIMES) - After four years of Mr Donald Trump's raging against his intelligence services, posting classified information to Twitter and announcing that he took the word of President Vladimir Putin of Russia over that of his own spies, perhaps the least surprising thing he did during his final days in office was ship boxes of sensitive material from the White House to his oceanside palace in Florida.
The FBI search of Mar-a-Lago on Monday (Aug 8) was a dramatic coda to years of tumult between Mr Trump and US intelligence and law enforcement agencies.
From Mr Trump's frequent rants against a "deep state" bent on undermining his presidency to his cavalier attitude toward highly classified information that he viewed as his personal property and would occasionally use to advance his political agenda, the relationship between the keepers of American secrets and the erratic president they served was the most poisoned of the modern era.
Mr Trump's behaviour led to such mistrust within intelligence agencies that officials who gave him classified briefings occasionally erred on the side of withholding some sensitive details from him.
A 'leaky ship'
It has long been common practice for the CIA not to provide presidents with some of the most sensitive information, such as the names of the agency's human sources.
But Mr Douglas London, who served as a top CIA counterterrorism official during the Trump administration, said officials were even more cautious about what information they provided Mr Trump because some saw the president himself as a security risk.
"We certainly took into account 'what damage could he do if he blurts this out?'" said Mr London, who wrote a book about his time in the agency called The Recruiter.
During an Oval Office meeting with top Russian officials just months into his presidency, Mr Trump revealed highly classified information about an Islamic State plot that the government of Israel had provided to the United States, which put Israeli sources at risk and angered US intelligence officials.
Months later, the CIA decided to pull a highly placed Kremlin agent it had cultivated over years out of Moscow, in part out of concerns that the Trump White House was a leaky ship.
In August 2019, Mr Trump received a briefing about an explosion at a space launch facility in Iran. He was so taken by a classified satellite photo of the explosion that he wanted to post it on Twitter immediately.
Aides pushed back, saying that making the high-resolution photo public could give adversaries insight into America's sophisticated surveillance capabilities.
He posted the photo anyway, adding a message that the US had no role in the explosion but wished Iran "best wishes and good luck" in discovering what caused it.
As he told one US official about his decision: "I have declassification authority. I can do anything I want."
Two years earlier, Mr Trump used Twitter to defend himself against media reports that he had ended a CIA programme to arm Syrian rebels, effectively disclosing a classified programme to what were then his more than 33 million Twitter followers.
If there is not one origin story that explains Mr Trump's antipathy toward spy agencies, the 2017 American intelligence assessment about the Kremlin's efforts to sabotage the 2016 presidential election - and Russia's preference for Mr Trump - played perhaps the biggest role.
Mr Trump saw the document as an insult, written by his "deep state" enemies to challenge the legitimacy of his election and his presidency.
Mr Trump's efforts to undermine the assessment became a motif in the early years of his presidency, culminating in a July 2018 summit in Helsinki with Mr Putin.
During a joint news conference, Mr Putin denied that Russia had any role in election sabotage, and Mr Trump came to his defence.
"They think it's Russia," Mr Trump said, speaking of US intelligence officials and adding, "I don't see any reason it would be."
Mr Trump often took aim at intelligence officials for public statements he thought undermined his foreign policy goals.
In January 2019, top officials testified to Congress that the Islamic State remained a persistent threat, that North Korea would still pursue nuclear weapons, and that Iran showed no signs of actively trying to build a bomb - essentially contradicting things the president had said publicly.
Mr Trump lashed out, saying on Twitter: "The Intelligence people seem to be extremely passive and naive when it comes to the dangers of Iran. They are wrong!"
"Perhaps Intelligence should go back to school!" he wrote.
'A league of his own'
Mr Trump was hardly the first American president to view his own intelligence services as enemy territory.
In 1973, Mr Richard Nixon fired Mr Richard Helms, his spy chief, after he refused to go along with the Watergate cover-up, and installed Mr James Schlesinger in the job with the mission of bringing the CIA in line.
Speaking with a group of senior analysts on his first day, Mr Schlesinger made a lewd comment about what the CIA had been doing to Mr Nixon, and demanded that it stop.
Mr Chris Whipple, an author who cites the Schlesinger anecdote in his book The Spymasters, said there is a long history of tension between presidents and their intelligence chiefs, but that "Trump really was in a league of his own in thinking the CIA and the agencies were out to get him."