On Tuesday evening, Trump unexpectedly fired FBI Director James Comey, who had been leading an investigation into whether officials with the Trump presidential campaign colluded with Russia to influence the 2016 presidential election.

The president’s dismissal letter cited recommendations from Attorney General Jeff Sessions, a former top adviser to Trump’s campaign, and recently confirmed Deputy Attorney General Rod Rosenstein. In a three-page memo, Rosenstein argued that Comey was unfit for the job because of his handling of the investigation into Democratic presidential nominee Hillary Clinton’s use of private email server while serving as secretary of state.

Rosenstein later reportedly threatened to resign over being painted as the mind behind Comey’s firing.

Comey, who was just four years into the typical 10-year term for his position, became the second FBI director in history to be formally terminated. He learned of the news on TV and initially thought it was a joke, according to several reports.

Lawmakers on both sides of the aisle balked at Trump’s decision. Democratic lawmakers renewed demands for a special prosecutor to investigate Trump’s alleged ties to the Russian government, and while many Republicans backed the president’s firing of Comey, several said they found the decision and timing to be troubling.