The Justice Department’s Inspector General has found that former FBI Director James Comey broke internal rules by sharing his memos on conversations with President Donald Trump with people outside the FBI.

The Inspector General said in a report released Thursday that Comey set a dangerous example for FBI employees by disseminating a memo in order to put pressure on then-Deputy Attorney General Rod Rosenstein to appoint a special counsel after Trump fired Comey in May 2017.

“[E]ven when these employees believe that their most strongly held personal convictions might be served by an unauthorized disclosure, the FBI depends on them not to disclose sensitive information,” the report said. “Former Director Comey failed to live up to this responsibility. By not safeguarding sensitive information obtained during the course of his FBI employment, and by using it to create public pressure for official action, Comey set a dangerous example for the over 35,000 current FBI employees—and the many thousands more former FBI employees—who similarly have access to or knowledge of non-public information.”

The report also said that the Justice Department, after reviewing the inspector general’s findings, decided against prosecuting Comey over the memos. The decision may disappoint Trump, who once retweeted a meme showing Comey behind bars, and reportedly told the former White House counsel he wanted to prosecute the ex-FBI director.

The report found no evidence that Comey or his lawyer shared classified material with reporters—a finding the former FBI director immediately cheered on Twitter. “I don’t need a public apology from those who defamed me, but a quick message with a ‘sorry we lied about you’ would be nice,” he wrote.

In the early months of the Trump presidency, Comey had multiple conversations with the president about the Russia probe that he memorialized. In one of those conversations, Trump pressured him to go easy on Michael Flynn, the ex-national security adviser who later pleaded guilty to lying to the FBI about conversations with Russia’s ambassador. Comey shared the memo with his lawyer, who then shared it with The New York Times.

Comey has drawn blistering criticism from both Democrats and Republicans in the years since the 2016 election season. When he made a public statement on July 5, 2016, criticizing Hillary Clinton’s use of her personal email to do government business, Republicans cheered. But Democrats, irate, lambasted him for sharing derogatory information discovered in the course of a criminal investigation about someone who was not charged with a crime.

Comey also shared additional information with Congress about the FBI’s scrutiny of Clinton’s email server in the weeks before Election Day. Clinton’s campaign argued that those revelations caused a decisive downturn in her support and handed the election to Trump.

All that endeared Comey to the right, but it didn’t last.

At the same time that it was scrutinizing Clinton’s emails, the FBI was also running a counterintelligence investigation into Russian meddling in the 2016 campaign. Comey confirmed the existence of the probe in congressional testimony on March 20, 2017.

“I have been authorized by the Department of Justice to confirm that the FBI, as part of our counterintelligence mission, is investigating the Russian government's efforts to interfere in the 2016 presidential election and that includes investigating the nature of any links between individuals associated with the Trump campaign and the Russian government and whether there was any coordination between the campaign and Russia's efforts,” he said. “As with any counterintelligence investigation, this will also include an assessment of whether any crimes were committed.”

Those two sentences really ticked off Trump. A few weeks later, on May 9, he fired the FBI director. The White House cited a memo Rosenstein had written about Comey’s handling of the Clinton investigation as grounds for his firing. But Rosenstein’s memo didn’t actually call for him to be dismissed. And days later, Trump told NBC News’s Lester Holt that he’d actually canned Comey because of the Russia probe.

“I said to myself, I said, ‘You know, this Russia thing with Trump and Russia is a made up story,’” Trump said.

Comey’s firing set off a panic at Justice Department headquarters. And on May 17, Rosenstein named Robert Mueller as special counsel overseeing the probe. Mueller’s work concluded this past spring.