James Comey told investigators that he leaked memos of his Oval Office conversations with President Trump in a bid to get preserved the supposed “tapes” of their talk that Trump had tweeted about.

“Comey told the OIG that on Tuesday, May 16, 2017, he ‘w[o]ke up at 2 o’clock in the morning, like, struck by a lightning bolt.’ He said he suddenly realized that if, as the President had said in his May 12, 2017 tweet, there were ‘tapes,’ then Comey’s version of his one-on-one conversations with Trump could be corroborated,” Inspector General Michael Horowitz wrote in his scathing, 83-page report on the former FBI chief’s actions.

“In particular, Comey told us he thought that the President ‘would be heard on that tape asking [Comey] to let Flynn go’ as Comey had documented,” the report said, referring to Trump’s then-national security adviser Michael Flynn, who was fired for lying to the FBI about his contacts with Russians.

The president had tweeted: “James Comey better hope that there are no ‘tapes’ of our conversation before he starts leaking to the press!”

Comey told the IG that “Trump will eventually figure out he shouldn’t have said that. And he may well destroy the tapes” and thus decided that “somebody needed to preserve them.”

He then leaked memos he had written to lawyer Daniel Richman, a Columbia Law School professor and personal friend, that summarized his conversation with the president, who he said had asked him to back off the Flynn investigation.

His goal, he has said and the report confirms, was to have a special counsel appointed to look into Russian election meddling and possible collusion with the Trump campaign, the latter of which has since been found to be baseless.

“And I thought, you know what, I can actually do something. That if I put out into the public square that encounter, that will force DOJ, likely to appoint a Special Counsel to go get the tapes. Or even if they won’t do that, it will force them to go get the tapes,” Comey told investigators.

Comey told the OIG he lay awake thinking the tapes could be preserved, “[b]ut only if I spur [the appointment of a Special Counsel] by putting this out.”

Deputy Attorney General Rod Rosenstein soon appointed Robert Mueller as special counsel.

Horowitz concluded that Comey violated Justice Department procedures by leaking the memos, but Attorney General William Barr chose not to prosecute.