James Comey makes a statement about the Hillary Clinton email investigation on July 5, 2016.Cliff Owen / AP

A report by the Justice Department’s internal watchdog found no political bias in the conduct of an investigation into Hillary Clinton’s use of a private email server and account, but it offers a scathing condemnation of how former FBI Director James Comey and other FBI employees handled aspects of the investigation, including extensive violations of Justice Department rules and protocols.

The report from Inspector General Michael Horowitz is a blow to both Comey and President Trump, who have fought a protracted battle in the press since the president abruptly fired Comey in May 2017. For Comey, the report is a harsh indictment of his judgment and decision-making that tarnishes his long career in law enforcement. The report also criticizes former Attorney General Loretta Lynch and several other Justice Department officials.

Yet the report also rejects Trump’s claims that the FBI went easy on Clinton. Investigators found no evidence that the FBI avoided charges because of political bias—ultimately concluding the decisions made during the investigation were reasonable. Trump has positioned himself to dismiss these findings, however. The president has repeatedly said that the Justice Department is a hive of political conspiracy against him.

There are elements of the report that show deep antipathy to Trump among some employees of the FBI, including newly revealed text messages between Peter Strzok and Lisa Page, who worked together at the FBI, and whose communications Trump has said are evidence of a conspiracy against him. Page has since left the bureau.

In the report, Comey’s approach to two connected incidents comes in for special opprobrium. The first is Comey’s July 2016 public announcement that he would recommend no charges against Clinton. The second is his decision to write to members of Congress 11 days before the presidential election, with the shocking news that the FBI had discovered new evidence in the Clinton case.

In the first instance, Comey violated protocol by making a public announcement, rather than sending a recommendation to Lynch, then the attorney general. Comey has said he made that decision because Lynch had met briefly with former President Bill Clinton on the tarmac at a Phoenix airport some days earlier, and he believed that if she made the announcement, it would be viewed as politically tainted.

Comey may be right—Lynch has been subject to withering and justified criticism for the chat, though she says the email probe was not discussed. The IG said there was no evidence to suggest otherwise, but added, “We also found that Lynch’s failure to recognize the appearance problem created by former President Clinton’s visit and to take action to cut the visit short was an error in judgment.”

But Horowitz’s report also determined that Lynch’s lapse in judgment did not grant Comey license to make his own recommendation public. In his public remarks at the time, Comey called Clinton “extremely careless” with classified information, but said there was no basis for charging her with a crime. From the IG report:

We concluded that Comey’s unilateral announcement was inconsistent with Department policy and violated long-standing Department practice and protocol by, among other things, criticizing Clinton’s uncharged conduct. We also found that Comey usurped the authority of the Attorney General, and inadequately and incompletely described the legal position of Department prosecutors.

In addition, the report faults Comey for withholding his plans to announce the recommendation from his bosses at the Justice Department, and for instructing employees to do the same. That decision was “extraordinary and insubordinate,” the report says, adding that “none of his reasons [was] a persuasive basis” for breaking longstanding policy.

The second incident came in the closing days of the presidential campaign, when Comey wrote to members of Congress to say the FBI was reopening its inquiry in light of newly found emails on devices belonging to disgraced former Representative Anthony Weiner, who was married to top Clinton aide Huma Abedin. DOJ policy holds that the department should not make announcements that could affect the outcome of an election, but Comey has said he was concerned that if he did not announce the emails publicly, he would be misleading Congress by omission, having publicly closed the case.

In the ensuing days, the bureau scrambled to review the messages, and quickly determined that the new evidence did not change its original conclusions. But Clinton, as well as analysts including Nate Silver, have said that the October 28 announcement, coming so close to the election, doomed her chances in an election decided by tens of thousands of votes.

The IG report notes that the emails were actually discovered in late September, and says that given the political sensitivities, the FBI should have acted much faster to deal with the material. FBI leaders explained the lag to investigators, in part, by blaming staffing issues. Some members of the Clinton investigation had been transferred to work on the investigation into Russian interference in the election, they said. They also did not believe the new information was likely to be significant. The inspector general rejected these and other excuses by the FBI, but also concluded that political bias did not play a role in the slow reaction.

“We searched for evidence that the Weiner laptop was deliberately placed on the back-burner by others in the FBI to protect Clinton, but found no evidence in emails, text messages, instant messages, or documents that suggested an improper purpose,” the report states.

Ultimately, the delay likely hurt rather than helped Clinton. Because the FBI did not act sooner, it was not until late October, on the eve of the election, that Comey was faced with his decision about how to handle the documents.

“We found no evidence that Comey’s decision to send the October 28 letter was influenced by political preferences,” the report concludes. Instead, it said that Comey incorrectly engaged in “ad hoc decisionmaking based on his own views,” and failed to contact the attorney general and deputy attorney general for counsel on how to handle the incident. “Although we acknowledge that Comey faced a difficult situation with unattractive choices, in proceeding as he did, we concluded that Comey made a serious error of judgment.”

The IG report does not extensively relitigate the decision not to recommend charges against Clinton in July, and notes that its role is not to second-guess outcomes. Rather, investigators were focused on whether the decisions made by the department were reasonable and untainted by bias, they said.

Yet there are elements of the report that the president is sure to seize on. As Trump has suggested, the IG report states that by the time the FBI interviewed Hillary Clinton herself, it had already “concluded that the evidence did not support criminal charges (absent a confession or false statement by Clinton during the interview),” but adds that the questions that were asked of Clinton and the methods used to assess her credibility were appropriate.

The IG’s critiques of the way Comey handled the case are not new. Republicans, and especially Democrats, had similar complaints during the election and afterwards. When Trump fired Comey in May 2017, the White House released a memo from Deputy Attorney General Rod Rosenstein that offered an abbreviated version of the IG’s rebukes of Comey’s conduct.

This stood at odds with Trump’s own comments about Comey, however. He had accused the FBI of bias in declining to charge Clinton, saying the decision was “rigged.” But after Comey’s October announcement, the Republican nominee changed his tune. “It took a lot of guts” for Comey to come forward in late October, Trump said. Beyond that, Trump told NBC News’s Lester Holt shortly after firing Comey that he fired him because of the “the Russia thing,” and said he’d decided to fire Comey regardless of what Rosenstein wrote in his memo.

The major takeaway is this: Trump’s comments about Comey run counter to the IG report in every major respect. Trump alleged political bias where Horowitz finds none, and lauded Comey where Horowitz condemns him.

The report is scathing for Comey, however. In his recent best-selling memoir A Higher Loyalty, and in the press blitz around it, Comey has defended his decisions in a register ranging between plaintive and self-righteous. The IG report demolishes his version of the story. In a column for The New York Times published shortly after the IG report was made public, Comey wrote that he did not agree with all of Horowitz’s conclusions, but that he appreciated the need for the report.

Beyond the specifics of the investigation, the IG report finds extensive problems at the FBI, including use of personal email to do government business, use of government devices for personal communications, discussions with reporters that far exceeded FBI guidelines, and inappropriate political sentiments. Among other revelations, the inspector general reports that Comey frequently used a private Gmail address to conduct federal government business, an ironic echo of Clinton’s own sins. (There are differences, in both record-keeping and security, between Google’s mail service and a personal server.)

The report finds that Andrew McCabe, the former FBI deputy director who was fired in March 2018, was not legally required to recuse himself from an investigation of Clinton, despite his wife’s Democratic campaign for state Senate in Virginia at the time. Yet once McCabe did recuse himself, the report found, he “did not fully comply with this recusal in a few instances related to the Clinton Foundation investigation.” The IG also found that then-Assistant U.S. Attorney General Peter Kadzik should have recused himself sooner from Clinton-related issues.

Some of the harshest criticism is for Peter Strzok, the FBI agent who worked on both the Clinton investigation and the inquiry into Russian interference in the election. He worked for Special Counsel Robert Mueller’s team before being transferred when questions arose about texts he wrote to his colleague, Lisa Page, that were critical of Trump. As I have reported, Page and Strzok, who were reportedly involved in a romantic relationship at the time, were highly critical of others, including the Clintons. Three other FBI employees on the Clinton investigation also sent messages critical of Trump.

The IG didn’t find any evidence that the political views in the messages influenced any FBI decisions. However, Horowitz condemned the officials’ actions in stark terms:

We found that the conduct of these five FBI employees brought discredit to themselves, sowed doubt about the FBI’s handling of the Midyear investigation, and impacted the reputation of the FBI. Moreover, the damage caused by their actions extends far beyond the scope of the Midyear investigation and goes to the heart of the FBI’s reputation for neutral factfinding and political independence.

This holds especially true for one shocking exchange, which is bound to become a constant talking point for Trump and his defenders in the weeks and months to come.

“[Trump’s] not ever going to become president, right? Right?!” Page wrote to Strzok in August 2016.

"No. No he won’t. We’ll stop it,” he replied.

Given the FBI’s long, dark history of meddling in politics, any such suggestion, even in a private text, is reason for concern and fear. As it happened, however, they did not stop it: Trump was elected several months later.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.