James Comey appears to have inadvertently played a role in his deputy Andrew McCabe’s expulsion from the FBI.

According to a source familiar with the investigation that led to McCabe’s firing, Comey—then FBI director—asked the bureau’s internal Inspection Division to look into an Oct. 30, 2016, Wall Street Journal story that included leaks from inside the bureau. The Inspection Division took on the case and started trying to determine who was responsible for the leak. When they realized McCabe, the bureau’s deputy director, was a likely culprit, they handed off the investigation to the Justice Department’s inspector general, according to an IG report released late last week.

Attorney General Jeff Sessions cited that detailed IG report when he announced McCabe had been fired barely before he was eligible for his retirement.

Comey’s role brings a new dimension to a high-profile, headline-grabbing Washington controversy that pitted Republicans against Democrats and bureau veterans against the White House. Shortly after his firing, McCabe released a statement saying it was due to President Donald Trump’s “ongoing war” with the bureau. Trump has suggested that Comey and McCabe conspired to keep Americans from knowing the truth about corruption in the bureau. “McCabe is Comey!” Trump once tweeted. Comey’s role in the genesis of the investigation that led to McCabe’s firing undermines that characterization.

And, of course, it comes as Comey is hawking his new book, A Higher Loyalty, which details the conversations he had with President Trump before his firing.

A lawyer for Comey and a spokesperson for McCabe both declined to comment.

That inspector general report says that sometime in May 2017, the Inspection Division expanded a pre-existing probe into media leaks to include an effort to determine “the source of the information” in that 2016 Wall Street Journal story.

The Journal piece referred to a conversation between McCabe and a senior Justice Department official about the Clinton Foundation investigation. McCabe told the IG that he privately authorized one of his deputies and an official in the FBI’s public affairs office to describe a conversation to the Journal between McCabe and a senior Justice Department official. That conversation was very tense, according to McCabe. In the conversation, the DOJ official asked McCabe why FBI agents were pursuing the Clinton Foundation investigation.

“Are you telling me that I need to shut down a validly predicated investigation?” McCabe replied.

“Of course not,” the DOJ official replied, after a pause.

The story that followed left Comey deeply upset because it highlighted extraordinary tensions between senior leadership at the bureau and a top official at Justice Department headquarters, according to the IG report.

Comey raised concerns about the article in a staff meeting the next day.

We “need to figure out how to get our folks to understand why leaks hurt our organization,” Comey said, according to notes taken by one of McCabe’s aides and revealed in the IG report.

McCabe and Comey later discussed the piece in person. The two men gave the inspector general vastly different characterizations of that conversation. In McCabe’s version, McCabe told Comey that he authorized the two FBI officials to share details of the conversation about the Clinton Foundation investigation with the Journal. Comey “did not react negatively, just kind of accepted it,” according to McCabe.

In Comey’s version, however, McCabe never told him he authorized the leaks to the Journal. Comey was “very concerned” about the story and thought it would be toxic for the FBI’s relationship with Justice Department headquarters. And according to Comey, McCabe said he had nothing to do with it.

“I have a strong impression he conveyed to me, ‘it wasn’t me, boss,’” Comey told the inspector general.

Comey also told the IG that he didn’t think McCabe was one of the Journal’s sources. McCabe’s own chief of staff also didn’t think McCabe participated in the story.

“[I]t really, highlights a dysfunction between the FBI and the, and DOJ,” McCabe’s chief of staff told the inspectors. “And to that end, it doesn’t really serve the greater good.”

The inspector general’s report ultimately concluded that Comey’s recollection of the Comey/McCabe conversation was the correct one, and that McCabe lacked candor with Comey about his role in the Oct. 30 article.

“We found it highly unlikely that Comey, in a discussion with McCabe that same day, would have been accepting of a disclosure authorized by McCabe that looked exactly like the type of leak that he was condemning to his staff,” the report says.

“McCabe’s disclosure was an attempt to make himself look good by making senior department leadership, specifically the Principal Associate Deputy Attorney General, look bad,” the report added.

“ We found it highly unlikely that Comey, in a discussion with McCabe that same day, would have been accepting of a disclosure... that looked exactly like the type of leak that he was condemning to his staff. ” — DOJ inspector general report

McCabe’s sacking set off a political firestorm. It came after a series of tweets from Trump criticizing him, and in the wake of reports in right-wing media highlighting McCabe’s wife’s candidacy for the Virginia Senate as a Democrat. Despite the timing, Justice Department officials point to the IG report as the justification for McCabe’s termination.

In the days after McCabe’s termination, one of Trump’s personal lawyers—who has since left his legal team—told The Daily Beast that it was time to end Robert Mueller’s special counsel investigation into potential coordination between Trump associates and the Kremlin.

“I pray that Acting Attorney General Rosenstein will follow the brilliant and courageous example of the FBI Office of Professional Responsibility and Attorney General Jeff Sessions and bring an end to alleged Russia Collusion investigation manufactured by McCabe’s boss James Comey based upon a fraudulent and corrupt Dossier,” John Dowd said the morning after McCabe’s firing.

Comey didn’t manufacture the Russia probe based on the so-called Steele dossier. But he did play a role in kicking off the investigation that led to McCabe’s firing.