A former CIA officer who was imprisoned for leaking classified information to journalists said he was initially was cleared of charges until Obama-era CIA Director John Brennan got involved.

John Kiriakou said he had "no idea" he was under investigation in 2007 for sharing details of terrorists' interrogations to journalists.

Kiriakou said his story should be relevant to President Donald Trump, who is dealing with the same officials in his Russia probe as Kiriakou did.

"In 2007, the Bush administration investigated me and determined I hadn't committed a crime," he said.

However, Kiriakou said that once President Obama took power in 2009, a series of memos showed that Brennan asked Attorney General Eric Holder to reopen his case.

Gohmert Calls for 2nd Special Counsel: Mueller Looking for 'Something to Take Trump Out'

You 'Seem Bitter and Angry': Cavuto Spars with WV's Blankenship over 'Sore Loser Law'

"The injustice is incredible," he said, adding that Brennan and then-FBI Director Robert Mueller "set out to ruin people" they don't like.

Kiriakou claimed Brennan sent the DOJ a memo asking the department to prosecute the officer for espionage.

The department said it had no evidence of such, but Brennan responded something to the effect of "charge him anyway and make him defend himself," according to Kiriakou.

Mueller, who was involved in the case, is "a man who chooses a person, then looks for a crime to hang on that person," Kiriakou said, adding that Mueller initiated the "John Kiriakou Task Force" to probe him.

Kiriakou claimed that Mueller waited nearly a year until he was forced to declare bankruptcy then dropped most of the charges.

Kiriakou spent 30 months in prison on a related charge, Tucker Carlson said.

"This president... sees injustice," Kiriakou added of Trump.

Carlson said he was incredulous that Brennan, who has been accused of leaking to the press himself, would seek to imprison Kiriakou on the same charge.

WATCH: Trump Shuts Down Question About Rosenstein at Appearance With South Korean President

'His Wig Looked Like Hillary': The Five Reacts to Ellison Dressing as Trump, Singing About 'Vlad'