During his presidential campaign, Mr Trump revelled in the publication of Democratic party emails that fuelled damaging stories about his opponent, Hillary Clinton. "Boy, I love reading those WikiLeaks," he told an Ohio crowd just before election day.
This week, Mr Trump vowed to punish the “low-life leakers” who have added to the turbulence of his first weeks in office.
Leaks bedevil all presidents, but the latest deluge of stories has the president demanding action. “I’ve actually called the justice department to look into the leaks,” Mr Trump said at a freewheeling press conference on Thursday. “Those are criminal leaks.”
The trigger for his outrage were news stories reporting that US intelligence agencies eavesdropping on the Russian ambassador had overheard Michael Flynn, the former national security adviser, discussing the prospect of relaxing US sanctions on Russia.
Like all presidents before him, Mr Trump does not exactly have a zero-tolerance policy toward leaks. Among the candidates to replace Mr Flynn is former General David Petraeus, who has his own history of leaking classified information.
Mr Petraeus pleaded guilty in 2015 to two counts of mishandling government secrets, was sentenced to two years probation and fined $100,000.
The former Central Intelligence Agency director admitted that he had given Paula Broadwell, his former mistress and biographer, eight notebooks containing code words for secret operations along with the names of covert US operatives.
But nor would Mr Trump be the first president to crack down on leakers. Barack Obama used the Espionage Act for more anti-leak prosecutions than all previous presidents combined, as he dealt with the fallout from massive leaks of classified material circulated by WikiLeaks and Edward Snowden, a former NSA contractor.
"The Obama legacy is mixed," says David Pozen, a professor at Columbia Law School. "On the one hand, there was an increase in the number of enforcement actions against suspected leakers. On the other, that increase in enforcement caused a major backlash from both parties."
In his second term, Mr Obama’s Department of Justice brought fewer such cases and modified its guidelines for subpoenaing reporters in leak cases. Now prosecutors can demand the identity of a journalist’s confidential source only as a last resort and only with the attorney-general’s personal authorisation.
Technology is making it easier to track interactions between government officials and reporters. Investigators used mobile phone data and electronic entry-and-exit records at the State Department to make a 2014 case against Stephen Kim, a department contractor, for sharing a classified document on North Korea's nuclear programme with a Fox News reporter.
Disclosure of the most sensitive information, such as the intercepts of the Russian ambassador's phone calls with Mr Flynn, is forbidden by statute. "If the leaker could be identified, he or she could be subject to a 10-year jail term for each instance of leaking such information," says Steven Aftergood, a secrecy policy expert at the Federation of American Scientists.
Other disclosures, such as revealing summaries of the president's phone calls with world leaders are not explicitly prohibited by law. But if the details are classified, someone leaking such information could be fired or have their security clearance revoked. The president has made clear his irritation over leaks about his calls to the leaders of Mexico and Australia.
“It’s supposed to be either confidential or classified,” he complained on Thursday. “All of a sudden, people are finding out exactly what took place.”
As uproar continues over his campaign’s alleged Russia ties, Mr Trump’s effort to change the subject to leaks has won support from influential Republicans. The chairmen of the House oversight and judiciary committees wrote to the DoJ’s inspector-general this week requesting an “immediate investigation” of how classified information ended up in news stories published by The Washington Post and the BBC.
The anti-leak initiative could also pose an early test for Jeff Sessions, the new attorney-general. He could be called upon to decide whether to pursue charges against Mr Flynn for making a false statement to FBI agents investigating his conversations with the Russian ambassador.
Nor will it be easy for the president to end unauthorised disclosures. His own White House aides routinely talk to reporters on a not-for-quotation basis.
"They make a lot of noise about leaking," said Lucy Dalglish, dean of the University of Maryland's journalism school.
“But as they say, the ship of state leaks from the top.”
Financial Times Service