The Justice Department Inspector General alleges in a damaging report made public Friday that former FBI Deputy Director Andrew McCabe inappropriately authorized the disclosure of sensitive information to a reporter and then misled investigators and former FBI Director James B. Comey about it on several occasions.

The report from Inspector General Michael Horowitz is remarkable for its level of detail, casting McCabe as a man who repeatedly lied to investigators and his own boss about his role in a disclosure of information, even while he lashed out at others who he thought might be responsible for leaks.

It accuses McCabe of lying at least four times, three of them under oath, and says that while he had the power to approve disclosures of information to the media, his doing so in this instance violated policy because it was done “in a manner designed to advance his personal interests at the expense of Department leadership.”

It also says McCabe and Comey contradicted one another in their descriptions of how a media disclosure was authorized. While the report favors Comey’s account, it will likely generate tough questions for him as he launches a media blitz to promote his new book.

Those in Washington have long been anticipating release of the document, which formed the basis of McCabe’s firing just 26 hours before he could retire from the FBI and begin collecting his full retirement benefits. McCabe vigorously disputes its conclusions, and his team distributed a point-by-point rebuttal of the inspector general’s allegations.

Release of the report comes at a moment when the Justice Department and FBI are under intense scrutiny from a president upset that agents this week raided the office of his personal lawyer. McCabe had already alleged that his firing was politically motivated, as the president had made clear he disliked McCabe long before the FBI’s former No. 2 official was fired.

Trump wrote on Twitter Friday, “DOJ just issued the McCabe report - which is a total disaster. He LIED! LIED! LIED! McCabe was totally controlled by Comey - McCabe is Comey!! No collusion, all made up by this den of thieves and lowlifes!”

Michael Bromwich, a lawyer for McCabe, said in a statement that McCabe’s treatment was “far more harsh and far less fair than he deserved,” and that the inspector general’s report “utterly failed to support the decision to terminate Mr. McCabe.” He said the report did not detail “any understandable motive for his alleged wrongdoing,” and said Trump had “further tainted the process” with his previous public comments on the Justice Department inspector general.

Melissa Schwartz, McCabe’s spokeswoman, wrote on Twitter that the timing of the document being handed over to Congress Friday was “fascinating,” then added, “But no report transmission to Mr. #McCabe and no public disclosure from the Office of the Inspector General. The transparency of this Friday news dump is a joke.”

A spokesman for the inspector general’s office declined to comment.

Lying to federal investigators is a crime, and the inspector general asserts that at least one of McCabe’s alleged lies was “done knowingly and intentionally.”

It is not clear if the matter is still being considered for a criminal investigation. The report was referred to the FBI, and the agency’s Office of Professional Responsibility recommended firing McCabe, which Attorney General Jeff Sessions did last month. McCabe has raised more than a half-million dollars for a legal-defense fund, and Bromwich said Friday he was actively considering filing a defamation lawsuit against Trump and others.

The conduct at issue in the report centers on an October 2016 news story in the Wall Street Journal, detailing tensions inside the FBI and Justice Department over two high-profile investigations — one into Hillary Clinton’s use of a private email server and the other into her family’s foundation. The story was written by Devlin Barrett, who is now with The Washington Post. At the time, the FBI had just revealed publicly it was resuming the Clinton email case, on the eve of the election.

McCabe now acknowledges he authorized his special counsel, Lisa Page, and Michael Kortan, the FBI’s then top spokesman, to talk to Barrett for the story. He has said he did so to push back against the notion that he was trying to stifle the Clinton Foundation investigation.

The story, importantly, disclosed the existence of the Foundation probe and revealed a phone call, which became of keen interest to inspector general investigators, where McCabe pushed back against a Justice Department official he perceived to be asking him to shut it down, or at least warning against overt steps in the case close to an election.

The inspector general report alleges McCabe for months led officials to believe he had not authorized any disclosures for the story, starting with Comey, his own boss.

By the inspector general’s telling, the two men had a conversation the day after the story was published, and later offered contradictory accounts of what happened.

Comey, the report claims, told investigators McCabe “definitely did not tell me that he authorized” the disclosure contained in the Wall Street Journal story.

“I have a strong impression he conveyed to me ‘it wasn’t me boss.’ And I don’t think that was by saying those words, I think it was most likely by saying ‘I don’t know how this s--- gets in the media or why would people talk about this kind of thing,’ words that I would fairly take as ‘I, Andy, didn’t do it,’” Comey told investigators of McCabe.

McCabe’s team, in responding to the report, disputed Comey’s account, asserting that emails between the two “clearly show that Mr. McCabe specifically advised Director Comey that he was working with colleagues at the FBI to correct inaccuracies in the story before it was published, and that they remained in contact through the weekend while the work was taking place.”

The inspector general said McCabe’s lawyer had previously argued McCabe’s account should be credited over Comey’s and complained the report “paints Director Comey as a white knight carefully guarding FBI information, while overlooking that Mr. McCabe’s account is more credible.” The inspector general ultimately sided with Comey, saying his account was supported by the “overwhelming weight” of evidence.

Comey’s lawyer declined to comment for this story.

McCabe was first questioned under oath about leaks by the FBI’s inspection division on May 9, the same day Comey would be fired. Sensitive information appearing in the media was by then a high priority in the bureau. Two other FBI officials, the assistant directors in charge of offices in New York and D.C., told the inspector general that McCabe had admonished them for leaks in the wake of the Wall Street Journal’s October story, not revealing he himself had authorized a disclosure.

By the inspector general’s telling, McCabe told inspection division agents under oath on May 9 that he had not authorized the disclosure and did not know who had. But when the agents asked him to sign a statement confirming as much, he did not do so.

The report says McCabe similarly told inspector general investigators on July 28 that he was not aware of his special counsel having been authorized to speak to reporters, and because he was not in Washington on the days she did so, he could not say what she was doing.

By that time, the inspector general had uncovered texts in a separate investigation showing that Page, McCabe’s counsel, had talked to the reporter. The texts have now become infamous, as they also show Page harbored intense dislike of Trump.

A lawyer for Page did not return a message seeking comment.

McCabe told the inspector general just days later that he had remembered authorizing Page to talk to the Wall Street Journal. He denied that being shown the text messages, which might raise questions about his story, caused him to change his account. McCabe’s team noted in a response that McCabe’s “main focus was on the urgent management and personnel decisions he had to take to deal with the text messages he was shown.”

A few weeks later, an agent from FBI’s inspection division again approached McCabe, and he confirmed he had authorized the disclosure. The agent told the inspector general investigators he confronted McCabe, noting that the team had put in “long nights and weekends” trying to determine who was responsible for the information in the story.

“And he kind of just looked down, kind of nodded, and said, yeah, I’m sorry,” the agent told inspector general investigators.

Bromwich, McCabe’s lawyer, said McCabe’s statements “are more properly understood as the result of misunderstanding, miscommunication, and honest failures of recollection based on the swirl of events around him, statements which he subsequently corrected.”

The inspector general shot back that in multiple interviews, McCabe, who was being asked about events he described as being dramatic, “has never made this claim of a failed memory, and in any event we did not find this to be a persuasive explanation for his inaccurate statement given McCabe’s other admissions.”