Of course, if Mr. Trump truly believed, as he said in his letter of dismissal, that Mr. Comey had undermined “public trust and confidence” in the agency, he could just as well have fired him on his first day in office.

Mr. Comey was fired because he was leading an active investigation that could bring down a president. Though compromised by his own poor judgment, Mr. Comey’s agency has been pursuing ties between the Russian government and Mr. Trump and his associates, with potentially ruinous consequences for the administration.

With congressional Republicans continuing to resist any serious investigation, Mr. Comey’s inquiry was the only aggressive effort to get to the bottom of Russia’s ties to the Trump campaign. So far, the scandal has engulfed Paul Manafort, one of Mr. Trump’s campaign managers; Roger Stone, a longtime confidant; Carter Page, one of the campaign’s early foreign-policy advisers; Michael Flynn, who was forced out as national security adviser; and Attorney General Jeff Sessions, who recused himself in March from the Russia inquiry after failing to disclose during his confirmation hearings that he had met twice during the campaign with the Russian ambassador to the United States.

We have said that Mr. Comey’s atrocious handling of the Clinton email investigation, which arguably tipped the election to Mr. Trump, proved that he could not be trusted to be neutral, and that the only credible course of action would be the appointment of a special prosecutor. Given all that has happened — the firing of the F.B.I. director, on top of Mr. Trump’s firing of the acting attorney general, Sally Yates, and his dismissal of nearly all United States attorneys — the need for such a prosecutor is plainer than ever. Because Mr. Sessions is recused, the decision to name a special prosecutor falls to Deputy Attorney General Rod Rosenstein, whose memo, along with a separate one by Mr. Sessions, provided Mr. Trump with the pretense to fire Mr. Comey.

This is a tense and uncertain time in the nation’s history. The president of the United States, who is no more above the law than any other citizen, has now decisively crippled the F.B.I.’s ability to carry out an investigation of him and his associates. There is no guarantee that Mr. Comey’s replacement, who will be chosen by Mr. Trump, will continue that investigation; in fact, there are already hints to the contrary.