The Justice Department has decided against prosecuting former FBI Director James Comey for leaking classified information following a referral from the department’s inspector general, sources familiar with the deliberations told Fox News.

“Everyone at the DOJ involved in the decision said it wasn’t a close call,” one official said. “They all thought this could not be prosecuted.”

Comey penned memos memorializing his interactions with President Trump in the days leading up to his firing. He then passed those documents to a friend, Columbia University Law Professor Daniel Richman, who gave them to The New York Times. Comey admitted to that arrangement during congressional testimony.

After the fact, the FBI classified two of those memos as “confidential.”

DOJ Inspector General Michael Horowitz had referred Comey for potential prosecution as part of an internal review.

But one of the key factors leading to the DOJ declining to prosecute apparently was the fact that the two memos were labeled “confidential” after he set in motion the chain of events that led to them ending up with the press.

Richman, now serving as an attorney to Comey, told Fox News he had "no comment" on the prosecutorial decision on Thursday.

Meanwhile, Fox News has learned that the release of Horowitz’s report is “imminent,” according to another source familiar with the investigation.

The report related to Comey’s leaks is separate from Horowitz’s review of alleged Foreign Intelligence Surveillance Act (FISA) abuses. That report’s release is delayed, according to sources, due to the potential components of Attorney General Bill Barr and U.S. Attorney John Durham’s investigation into alleged improper government surveillance.

Horowitz publicly confirmed last year that his office was investigating Comey for his handling of classified information as part of memos he shared documenting his discussions with the president.

In June 2018, during a hearing before the Senate Judiciary Committee, Horowitz said he “received a referral on that from the FBI,” and was “handling that referral.”

“We will issue a report when the matter is complete and consistent with the law and rules,” Horowitz said at the time.

Comey last year also confirmed to Fox News that the inspector general’s office had interviewed him with regard to memos, but downplayed the questions over classified information as “frivolous”—saying the real issue was whether he complied with internal policies.

Fox News learned last year that Horowitz was looking at whether classified information was given to unauthorized sources as part of a broader review of Comey’s communications outside the bureau—including media contact.

Comey, whom Trump fired in May 2017, denied that sharing the memos with his legal team constituted a leak of classified information. Instead, he compared the process to keeping “a diary.”

“I didn’t consider it part of an FBI file,” Comey told Fox News' Bret Baier last year. “It was my personal aide-memoire…I always thought of it as mine.”

In his testimony in June 2017 before the Senate Intelligence Committee, Comey said he made the decision to document the interactions with the president in a way that would not trigger security classification.