Back in early October 2016, about a month before the presidential election, U.S. intelligence officials were about to release a statement on what appeared to be a concerted Russian effort to interfere in the American democratic process. But FBI Director James Comey, in an email to James Clapper, the director for national intelligence, and John Brennan, the director of the CIA, counseled against it.

“I think the window has closed on the opportunity for an official statement, with 4 weeks until a presidential election,” Comey wrote. “I think the marginal incremental disruption/inoculation impact of the statement would be hugely outweighed by the damage to the [intelligence community’s] reputation for independence.”

Thanks to media reports, he explained, most Americans were already aware of Moscow’s meddling.

“Our ‘confirming’ it (1) adds little to the public mix, (2) begs difficult questions about both how we know that and what we are going to do about it, and (3) exposes us to serious accusations of launching our own ‘October surprise,’” he wrote. “That last bit is utterly untrue, but a reality in our poisonous atmosphere.”

Three weeks later, Comey informed Congress that the FBI had reopened the investigation into Hillary Clinton’s use of a private email server. His brazen and unnecessary move may have tipped the election in Donald Trump’s favor.

Comey’s October 5 email became public on Thursday as part of the Justice Department inspector general’s long-awaited report on the FBI’s actions during the 2016 election. It’s one of many examples in the report where a palpable fear of bad-faith criticism from conservatives—the “poisonous atmosphere” to which Comey referred—shaped decision-making at the FBI and the Justice Department, and ultimately changed the course of American history.

This is what many liberals had feared all along. “We may never know the full story, but the best guess is that Mr. Comey, like many others—media organizations, would-be nonpartisan advocacy groups, and more—let himself be bullied by the usual suspects,” The New York Times’s Paul Krugman wrote in the days after Comey’s letter to Congress about the Clinton investigation. “Working the refs—screaming about bias and unfair treatment, no matter how favorable the treatment actually is—has been a consistent, long-term political strategy on the right. And the reason it keeps happening is because it so often works.”

Working the refs is most commonly used to influence media organizations’ news coverage, but the tactic is effective against any institution that values the public’s perception of them as neutral and credible civic actors. The FBI and the Justice Department have spent decades since the Watergate crisis cultivating a reputation of non-partisan independence, and they’ve largely succeeded at keeping themselves at arm’s length from the White House’s whims. Comey seems to genuinely value that tradition, making him susceptible to bad-faith pressure.

“The FBI is petrified of criticism from its conservative detractors, and is relatively indifferent to its liberal critics,” The Atlantic’s Adam Serwer explained in April. “Comey may have known that the Republican outrage over not disclosing the reopened Clinton investigation would dwarf whatever frustration Democrats might express at the opposite course of action, had he kept it under wraps as Justice Department guidelines obligated him to do.”

If newspapers are the first draft of history, then the inspector general’s report on the FBI’s handling of the 2016 election is a long-overdue revision. The 568-page behemoth released on Thursday covers sins large and small that were committed by federal investigators during the Clinton investigation. Its narrative appropriately begins with the House Benghazi Committee, a Republican-led effort set up to investigate the deaths of four Americans in a 2012 attack on a U.S. consulate in Libya.

That probe metastasized into multiple congressional investigations that centered on then-Secretary of State Hillary Clinton. Even then, it was virtually assured that she would be the Democratic presidential nominee in 2016. House Majority Leader Kevin McCarthy admitted in a 2015 Fox News interview that Republicans used the Benghazi investigations to inflict political damage on her eventual presidential bid.

“Everybody thought Hillary Clinton was unbeatable, right?” he said. “But we put together a Benghazi special committee, a select committee. What are her numbers today? Her numbers are dropping. Why? Because she’s untrustable. But no one would have known any of that had happened had we not fought and made that happen.”

Republicans found no evidence of wrongdoing or misconduct on Clinton’s part in the Benghazi tragedy. But as part of their extensive records requests, they discovered something else: Clinton had carried out official business with email accounts set up through private servers instead of the official State Department accounts. Some of the emails she sent and received were personal in nature. Others included unmarked classified information. None had been properly stored according to federal records laws. The fishing expedition finally had a catch.

Using personal accounts to conduct government business isn’t uncommon for top government officials from both parties, although maintaining a private server was highly unusual. Colin Powell, one of Clinton’s predecessors, even told her in 2009 that he ignored CIA and NSA warnings about using personal devices during his tenure. Republicans still hammered Clinton for it and demanded criminal investigations for mishandling classified information. Media coverage also blew the saga out of proportion: Network newscasts spent more time covering the nefarious-sounding “Clinton email scandal” than all policy issues put together.

The FBI opened its investigation into Clinton’s use of a private email server in July 2015. Codenamed “Midyear Exam,” it focused on whether Clinton and her aides had improperly stored or transmitted classified information. Though none of them were ever formally listed as subjects or targets of the investigation, they could have faced criminal charges if prosecutors found evidence that they intentionally mishandled the nation’s secrets or lied to investigators about it.

No such evidence emerged. The inspector general’s report quotes an unnamed FBI agent who used his official phone to vent with colleagues about the probe’s apparent futility. “No control and horrible decisions and chaos on the most meaningless thing I’ve ever done with people acting like fucking 9/11,” he wrote in a September 2015 text message. “Its just so obvious how pointless this exercise is,” he added in October. In interviews with the inspector general, the agent said his claim the investigation was “meaningless” was “a little exaggerated,” but added that “maybe the intense scrutiny didn’t seem commensurate to what we had to do.”

As it became clear in early 2016 that Midyear Exam hadn’t turned up anything that warranted criminal prosecution, the question turned to how best to wrap it up. Comey readily acknowledged in interviews with the inspector general that there was no evidence Clinton had intentionally broken the law, that it looked like a “fairly typical spill” of classified information, and that “there was no fricking way that the Department of Justice in a million years was going to prosecute that.” The report describes how Comey became consumed with the idea of selling his decision to the American public.

Comey said that, as he came to this realization, he became concerned that the Department would be unable to announce the closing of the investigation in a way that the public would find credible and objective. Comey said he was concerned that having the Department’s political leadership announce a declination would expose it to a “corrosive doubt about whether you did [the investigation] in a credible way.” He said that this concern “dominated [his] thinking ... for most of 2016, but especially from the spring on.” According to Comey, his concern was based on the appearance or perception created by the Department’s leadership declining prosecution of the presumptive Democratic nominee, because they were political appointees; it was not based on evidence that Lynch or Yates were interfering in the investigation or were politically biased.

The “corrosive doubt” in this case wouldn’t come from the American public as a whole, but from Republicans hellbent on damaging Clinton’s political prospects. The report details how these bad-faith actors pushed him to depart from the Justice Department’s standard practices. “[M]y view was, still is, that the more information you are able to supply, the higher the credibility of the investigation and the conclusion,” he told the inspector general. “And that especially in a poisonous political atmosphere, where all kinds of nonsense is said, the more you can fill that space with actual facts, the more reliable, believable, credible the conclusion is.”

Comey is clearly an intelligent man and usually a perceptive one as well. That makes his framing all the more galling. Describing implicit conservative threats to discredit the FBI as nothing more than a “poisonous political atmosphere” makes them sound like a natural phenomenon instead of a conscious strategy. At best, it’s a stunning political blind spot for the man who led the nation’s most powerful law-enforcement agency. Instead of disregarding that “all kinds of nonsense” would be said about him, Comey instead chose to defer to those spreading it.

All of Comey’s decisions flowed from this mistake—defying Justice Department leadership to announce his investigation’s findings, describing Clinton’s conduct as “extremely careless” in his official capacity, and especially his decision to inform Congress about the discovery of Clinton emails on Anthony Weiner’s laptop before determining whether they were significant. Comey also acknowledged that he, like many others, had also acted under the assumption that Clinton would win.

“Comey told us that he was concerned that if the FBI failed to disclose the new information, it could be accused of attempting to help Clinton get elected,” the report notes. “He stated that ‘to conceal that, in my view, would be—subject the FBI and the Justice Department, frankly more broadly ... to a corrosive doubt that you had engineered a cover up to protect a particular political candidate.’”

The inspector general’s conclusion is concise and damning: “Comey’s description of his choice as being between ‘two doors,’ one labeled ‘speak’ and one labeled ‘conceal,’ was a false dichotomy. The two doors were actually labeled ‘follow policy/practice’ and ‘depart from policy/practice.’ 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 report does not specifically call out those responsible for pressuring Comey and the FBI into a series of catastrophic decisions. That would be beyond the scope of the inspector general’s mandate to focus on Justice Department wrongdoing, not the acts of those outside it. What’s clear from his report is that working the refs worked beyond conservatives’ wildest dreams, and that we are all still paying the price for it.