President Donald Trump fired Federal Bureau of Investigation Director James Comey on Tuesday, the White House said in a statement.

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

Letters from Trump, Sessions, and Rosenstein on James Comey pic.twitter.com/msc7QBV3xL — Allan Smith (@akarl_smith) May 9, 2017

Comey — who was appointed four years ago by former President Barack Obama — is only the second director since 1972 to be removed from his post by a president.

The White House said a search for Comey’s replacement will begin immediately.

The statement said Trump consulted with Attorney General Jeff Sessions and Deputy Attorney General Rod Rosenstein before making his decision.

Comey drew attention during the election when his agency reopened a probe into possible misconduct by former Democratic presidential nominee Hillary Clinton when she was serving as secretary of state under Obama.

Comey reopened the investigation just days before Election Day.

Shortly before he was dismissed, the FBI reportedly informed Congress that Comey had misstated several key findings during his testimony. It was not believed at the time that his job was in peril.

Comey testified last week that the decision to reopen the probe came down to a painful, complicated choice between “really bad” and “catastrophic” options. He said he’d felt “mildly nauseous” to think he might have tipped the election outcome but in hindsight would change nothing.

“I would make the same decision,” Comey declared during a lengthy hearing in which Democratic senators grilled him on the seeming inconsistency between the Clinton disclosure 11 days before the election and his silence about the bureau’s investigation into possible contacts between Russia and Trump’s campaign.

Comey, offering an impassioned public defense of how he handled the election-year issues, insisted that the FBI’s actions in both investigations were consistent. He told the Senate Judiciary Committee that the FBI cannot take into account how it might benefit or harm politicians.

“I can’t consider for a second whose political futures will be affected and in what way,” Comey told the senators. “We have to ask ourselves what is the right thing to do and then do that thing.”

Persistent questions from senators, and Comey’s testimony, made clear that the FBI director’s decisions of last summer and fall involving both the Trump and Clinton campaigns continue to roil national politics and produce lingering second-guessing about whether the investigations were handled evenly.

Clinton partly attributed her loss to Comey’s disclosure to Congress less than two weeks before Election Day that the email investigation would be revisited.

Trump disagreed, tweeting that Comey actually “was the best thing that ever happened to Hillary Clinton in that he gave her a free pass for many bad deeds!”

Comey grabbed headlines earlier this year when he refuted the president’s claims that the previous administration had wiretapped Trump Tower, which served as the campaign headquarters for Trump and opened the aforementioned investigation into ties between Trump’s campaign and Russia.

The Associated Press contributed to this report.

Follow @KTAR923