Some Democrats immediately raised the specter of Watergate and called for a special counsel to lead an independent investigation into the Russian meddling and any ties to Mr. Trump’s campaign. “This is Nixonian,” Senator Robert Casey, Democrat of Pennsylvania, said in a statement.

“Not since Watergate have our legal systems been so threatened and our faith in the independence and integrity of those systems so shaken,” added Senator Richard Blumenthal, Democrat of Connecticut.

The paradox, of course, is that Mr. Comey had few fans among Democrats, especially Hillary Clinton, who just last week blamed him for steering the election to Mr. Trump by publicly announcing shortly before the election that he was reopening his investigation into her private emails.

Ever since Watergate, presidents have shied away from open confrontations with F.B.I. directors no matter how frustrated they were.

President Bill Clinton clashed with Louis J. Freeh, the bureau director during his tenure, but he never risked the political backlash that would have come had he dismissed him. When Robert S. Mueller III threatened to resign as F.B.I. director if a secret surveillance program he considered illegal were continued, President George W. Bush backed down rather than risk the scandal that would have ensued. Joining Mr. Mueller in that threat, as it happened, was a deputy attorney general names James Comey.

Timothy Naftali, a former director of the Richard M. Nixon presidential library, said Mr. Trump’s dismissal of Mr. Comey was not a direct parallel to the Saturday Night Massacre because he was not appointed specifically to investigate the 2016 campaign.

“With or without Mr. Comey, the F.B.I. will continue to investigate the 2016 campaign as it relates to Russian intervention,” Mr. Naftali said. “This is another kind of mistake. Unless Attorney General Sessions can prove malfeasance or gross negligence by Comey, the timing of this action further deepens suspicions that President Trump is covering up something.”