WASHINGTON ― President Donald Trump on Tuesday fired FBI Director James Comey, who had been leading an investigation into whether Trump’s campaign colluded with Russia to influence the presidential election.

Attorney General Jeff Sessions, a former top adviser to Trump’s campaign, and recently confirmed Deputy Attorney General Rod Rosenstein recommended Comey be removed from his post in letters to Trump Tuesday. Sessions has recused himself from FBI investigations into the Russia matter and the Trump campaign.

Comey, a Republican who formerly served as deputy attorney general during the President George W. Bush administration, had been leading the FBI’s investigation into possible ties between Trump associates and Moscow since July.

Presidents have the legal authority to fire FBI directors, who normally serve 10-year terms that span administrations. Comey was confirmed by the Senate in a nearly unanimous vote in July 2013, and was nearly four years into his term. He is only the second FBI director in history to be formally terminated, after William S. Sessions, who was fired by President Bill Clinton in 1993.

Democrats called for a special prosecutor to investigate the Russia matter.

Rep. Adam Schiff (Calif.), ranking Democrat on the House Intelligence Committee, suggested Comey’s firing could amount to interference with the FBI’s Russia investigation.

“The decision by a President whose campaign associates are under investigation by the FBI for collusion with Russia to fire the man overseeing that investigation, upon the recommendation of an Attorney General who has recused himself from that investigation, raises profound questions about whether the White House is brazenly interfering in a criminal matter,” Schiff wrote in a statement.

Sen. Chuck Grassley (R-Iowa), who chairs the Senate Judiciary Committee, said Comey’s actions “called into question the trust and political independence of the FBI,” and said the bureau had been slow to provide answers to his questions.

Senate Intelligence Committee Chairman Richard Burr (R-N.C.) said he was “troubled by the timing and reasoning” behind the firing. “I have found Comey to be a public servant of the highest order, and his dismissal further confuses an already difficult investigation by our Committee,” Burr said in a statement.

Rep. John Conyers (D-Mich.), ranking member of the House Judiciary Committee, called Trump’s actions a “Tuesday Night Massacre,” a reference to former President Richard Nixon’s 1973 firing of Watergate special prosecutor Archibald Cox.

“Today’s action by President Trump completely obliterates any semblance of an independent investigation into Russian efforts to influence our election, and places our nation on the verge of a constitutional crisis,” Conyers said. “Today’s actions reek of a cover up and appear to be part of an ongoing effort by the Trump White House to impede the investigation into Russian ties and interference in our elections.”

Trump’s letter dismissing Comey told him “you are not able to effectively lead the Bureau.”

“The FBI is one of our Nation’s most cherished and respected institutions and today will mark a new beginning for our crown jewel of law enforcement,” Trump said in a statement.

Deputy White House press secretary Sarah Huckabee Sanders said later on Fox News that Comey’s firing wouldn’t cause “any change or disruption” in the FBI’s Russia-related investigations. But the “bigger point,” she said, is that “it’s time to move on.” “When are they going to let that go,” Huckabee Sanders told Fox’s Tucker Carlson. “It’s been going on for nearly a year, frankly it’s kind of getting absurd. There’s nothing there, we’ve heard that time and time again, we’ve heard it in the testimonies earlier this week, we’ve heard it for the last 11 months.

Comey had been ensnared in controversy for months over his handling of the FBI’s investigations into the Russia matter and former Secretary of State Hillary Clinton’s use of a private email server.

“Almost everyone agrees the Director made serious mistakes; it is one of the few issues that unites people of diverse perspectives,” Rosenstein wrote in his letter to Trump.

When the FBI concluded its investigation into Clinton’s use of a private email server in July, Comey took the unusual step of holding a press conference, explaining the FBI’s reasoning for recommending no criminal charges be brought against the then-Democratic nominee.

Democrats and some former Justice Department staffers criticized Comey, who spent the bulk of the press conference criticizing Clinton’s handling of classified emails, for speaking publicly about the result of a criminal investigation. Then-Attorney General Loretta Lynch had said at the time that she would accept the findings of FBI agents leading the investigation.

But three months later, and just days before the election, Comey reignited the Clinton email controversy. On Oct. 28, he sent a letter to congressional leaders explaining that the FBI was investigating newly discovered Clinton emails. The letter leaked immediately, and Clinton fell in the polls.

Two days before the election, Comey told Congress that the FBI had discovered no evidence that changed its recommendation against criminal charges for Clinton. But the damage was done. Many Clinton staffers blame the Oct. 28 letter for her loss.

Clinton had no comment on Comey’s dismissal, a spokesperson told CNN.

Before Comey sent the letter, a junior attorney asked him to consider that his actions might help Trump win the election, he recounted last week. Comey decided that for him to take politics into consideration would compromise the FBI’s independence. “I can’t consider for a second whose political fortunes will be impacted in what way,” he said.

At the same time that the Clinton email scandal was publicly unfolding, the FBI was running a much quieter investigation into Russian attempts to sway the presidential election — and whether any members of Trump’s campaign staff colluded with Moscow.

As news of the Russia probe trickled out in news reports, lawmakers pressed Comey, both public and in private, to confirm whether Trump and his team were under investigation for possible ties to Russia. For months, Comey stayed silent.

“I would never comment on investigations ― whether we have one or not ― in an open forum like this, so I can’t answer one way or another,” Comey told lawmakers in January during a congressional hearing.

“The irony of your making that statement, I cannot avoid,” Sen. Angus King (I-Maine) responded at the time.

It was not until March 20, two months after Trump entered the White House, that Comey publicly confirmed the investigation into the Trump campaign.

Once Trump assumed office, he had ties to most of the top figures in charge of overseeing investigations on the Russia matter: Sessions was appointed attorney general. Burr, the Senate Intelligence Committee chairman, and House Intelligence Chairman Devin Nunes (R-Calif.) ― who were tasked with leading the congressional probes into Russian election interference ― were close Trump allies.

Comey was the exception. (Along with Sessions, Nunes has since recused himself from the investigations.)

Mary McCord, a high-level DOJ official working on the Russia probe, also will leave her job this month. Her departure, announced in April, does not appear to be related.

The Justice Department’s inspector general opened an investigation into Comey’s actions in January. The results have not yet been announced.

Last week, Comey told lawmakers that the idea that the FBI swayed the outcome of the election made him “mildly nauseous.” But, he added, it wasn’t fair to second-guess his decision, because he believed his only choices were to speak out, or to “conceal” information. The latter, he argued, would have been “catastrophic.”

Sessions told FBI employees in a message Tuesday evening that Deputy Director Andrew McCabe would be acting director.

The Washington Post via Getty Images

Here’s Trump’s letter to Comey:

Trump defended his decision on Twitter, lashing out at Senate Minority Leader Chuck Schumer (D-N.Y.)

Cryin' Chuck Schumer stated recently, "I do not have confidence in him (James Comey) any longer." Then acts so indignant. #draintheswamp — Donald J. Trump (@realDonaldTrump) May 10, 2017

Here’s the letter from Attorney General Jeff Sessions recommending Trump fire Comey:

Here’s the letter from Deputy Attorney General Rod Rosenstein explaining the reasoning for firing Comey:

Ryan Grenoble contributed.