Chip Somodevilla / Getty Images

Before he was summarily fired by the chief executive he played no small role in electing, former FBI Director Jim Comey told Congress that his late-October 2016 decision to violate Department of Justice guidelines by telling Congress he was reopening the Clinton email investigation was done to avoid the perception of political favoritism.

“I have a fabulous staff at all levels and one of my junior lawyers said, should you consider that what you're about to do may help elect Donald Trump president,” Comey said. “And I said, thank you for raising that, not for a moment because down that path lies the death of the FBI as an independent institution in America. I can't consider for a second whose political fortunes will be affected in what way.”

One of the many great political ironies of the past year is that Comey may have dealt a severe blow to the FBI’s independence in part by seeking to shield the FBI from conservative political backlash. Comey’s decision to break precedent twice, first by holding a press conference in June in which he excoriated Hillary Clinton’s “carelessness” in her handling of classified material, and then with his late October announcement that he was reopening the investigation because new emails had potentially been discovered, were both political decisions. The latter choice, according to political analysts like Nate Silver, likely swung the election to the man who fired him.

Those choices were responses to Republican complaints that the Clinton email investigation had been compromised by a brief meeting between then-Attorney General Loretta Lynch’s and former President Bill Clinton, the husband of the Democratic presidential nominee, and then later to attacks from Donald Trump, who as a candidate loudly proclaimed that the investigation had been “rigged.” Without that political climate, there would have been no threat to the FBI’s independence, and no need for Comey to fear that it could be compromised. In other words, despite insisting he was not considering anyone’s political fortunes, he was in fact, considering his own and that of the FBI.

Comey testified to Congress that his July announcement was made necessary by a meeting between Clinton and Lynch. He felt the need to reassure the public that there had been no political influence on the investigation. His October announcement, he told Congress, was necessary because he had testified that the Clinton email investigation was closed and wanted to ensure he was not misleading Congress.

Both his June and October announcements were cited as reasons for Comey’s dismissal in a memo authored by Deputy Assistant Attorney General Rod Rosenstein. Rosenstein wrote that Comey was “wrong to usurp the Attorney General’s authority” with his July announcement. While Comey had framed his October choice as one between speaking or concealing that the investigation had been re-opened, Rosenstein wrote that when “federal agents and prosecutors quietly open a criminal investigation, we are not concealing anything; we are simply following the longstanding policy that we refrain from publicizing non-public information.”

Indeed—by following procedure and not similarly disclosing that the FBI was also investigating the Trump campaign’s potential connection to Russian interference in the election, Comey had effectively shielded the Republican candidate from political peril while likely fatally damaging Democratic chances of winning the White House.

Many of those who know Comey—including Democrats dismayed by his actions—believe him to have done what he believed was best. Even his most ardent critics do not believe whomever Trump chooses as his replacement is likely to be better.

It is nevertheless hard to dispute that Comey’s decisions offered legitimate grounds for dismissal. Yet given that both Trump and Attorney General Jeff Sessions praised Comey’s conduct at the time, and the existence of an ongoing inspector general investigation into Comey’s decisions, the stated rationale for Comey’s firing seems a farce that no one, not even its proponents, actually believes.

The strongest defense of Comey’s behavior is that the bureau faced a much greater threat of interference from Republicans than Democrats. The right-wing media environment incubates conspiracy and extremism with few moral or commercial restraints. Republicans controlled both houses of Congress, and their presidential nominee was publicly undermining faith in the bureau at campaign rallies. After watching the GOP convene more than a dozen inquiries into the 2012 attack on the U.S. embassy in Benghazi, Libya, there was no small risk that the bureau could face a similar fate to that of the State Department if Republicans saw Comey as protecting Clinton by not telling Congress the FBI was reopening the email inquiry. Comey was also reportedly concerned about potential leaks to the press about the investigation from Trump supporters at the bureau.

Yet Comey’s choices have now led to the exact outcome Comey sought to prevent. As my colleague Peter Beinart writes, by firing Comey for refusing to back up the president’s lie that Obama ordered Trump wiretapped, and for not shutting down the investigation into the ties between the Trump campaign and the Russian government, Trump has made the office of FBI director just another plum prize in the political spoils system. Trump will now be able to nominate a successor to Comey who will have the authority to shut down the Russia investigation the president has found so troublesome.

Now the FBI has been afflicted by the same contagion that has twisted the very nature of public service since Trump took office. Trump has made it clear that he holds personal loyalty and obedience paramount. Public servants are there to serve the public,  and the interests of the president and that of the public are not necessarily the same. When those diverge, loyalty to the country takes precedence over fealty to its political leadership. No one who would meet Trump’s implied criteria for the job would be fit to take it.

The threat this poses to American democracy is now two-fold. First, the FBI, which possesses incredible power to imprison Americans and monitor their private lives, has itself become a constituency for politicians appease lest, like Clinton, they become a target of agents’ wrath. Those powers are meant to enforce the law and protect the country, not to enhance the bureau’s political influence among lawmakers, denigrate candidates for office agents find distasteful, or to decide the outcome of elections.

The second is that any FBI director hired by Trump must conclude that he believes their role is to back up the president’s falsehoods, no matter how preposterous, to shield him from political embarrassment, and to protect the president and his associates from any potential legal jeopardy. That would be a fundamental corruption of the bureau’s purpose, which is to protect the American people from crime and terrorism, not pick presidents or shield those presidents from political blowback.

The entire post-Watergate legal apparatus meant to prevent intelligence and law enforcement agencies from abusing their near-infinite authority for political purposes has been placed at risk by Comey’s miscalculation. The history of the FBI abusing its powers for political reasons, often at the direct request of presidents, foreshadows a universe of disturbing possibilities for the future of its role in American politics. Even if the nightmare scenarios never occur, the mere possibility of a repeat of what happened in October 2016 will shape political speech and behavior.

Comey said he sought to preserve the FBI’s political independence. But that was never the whole truth. Comey sought to appease the Republicans whose complaints and criticisms he took seriously enough to address by breaking Justice Department guidelines. But he never seems to have taken Democratic complaints that seriously, or ever feared that their frustration with the FBI would compromise the bureau’s political independence.

Comey was so focused on defending himself, and his agency, from political attacks from the right that he effectively ceded to his critics the independence he thought he was protecting. No wonder, then, that both Trump and his Republican allies in Congress felt confident that they could defenestrate Comey without facing any serious consequences.

The bureau’s political independence was compromised long before Trump fired Comey, because Comey himself compromised it. In doing so, he set the stage for his own downfall. His miscalculation cost him his job; it will cost the nation immeasurably more.

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