President Trump fired FBI Director James Comey on Tuesday, the latest fallout from an election-year saga that found the FBI director at the center of political controversies ranging from Trump's connections to Russia to Hillary Clinton's handling of classified e-mails.

Trump's decision to fire Comey was based on the "clear recommendations" of both Deputy Attorney General Rod Rosenstein and Attorney General Jeff Sessions, White House spokesman Sean Spicer said.

“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.

‚ÄčA search for a new permanent FBI director will begin immediately, Spicer said.

The firing came just after the FBI confirmed Comey provided erroneous testimony to a Senate panel about how Hillary Clinton aide Huma Abedin handled classified emails.

A career prosecutor, Comey, held top Justice Department posts in the George W. Bush administration before being appointed FBI director by President Barack Obama in 2013.

He is only the second director fired in the 82-year history of the FBI. President Bill Clinton fired FBI Director William Sessions in 1993 amid ethics problems. While FBI directors are appointed to 10-year terms in order to make them nominally non-partisan, they can still be fired by the president.

Comey's firing calls into question the future of the investigation into Russian hacking of the 2016 presidential election.

The FBI is currently in the midst of a full-blown counterintelligence inquiry, exploring charges of possible collusion between Trump campaign associates and Russian officials.

Democrats are already questioning whether Comey's firing is an effort to stymie the Russia investigation. Brian Fallon, a former spokesman for the Obama Justice Department and the Clinton campaign, tweeted: "I'm not shedding any tears for Comey personally – he hurt FBI's reputation – but I do worry whether we ever get to the bottom of Russia now."

Sen. Bob Casey, D-Pa., called Trump's move to fire Comey "Nixonian," and demanded that Rosenstein appoint a special counsel to investigate Russian election interference.

But Comey has also found himself at odds with Democrats, who blamed his Oct. 28 announcement that he was re-opening an investigation into Clinton's emails for her loss in the election 11 days later.

Rosenstein, confirmed by the Senate two weeks ago as Comey's day-to-day supervisor, faulted Comey for his July 5 news conference saying no charges would be filed against Clinton, and for announcing that he had re-opened the case so close to the election.

In a memo to the attorney general, Rosenstein said he did not understand Comey's refusal to acknowledge his problems.

"Almost everyone agrees that the director made serious mistakes; it is one of the few issues that unites people of different perspectives," Rosenstein wrote.

Meanwhile, as Comey remains the target of public criticism over his handling of the Clinton case, the Justice Department’s inspector general is in the midst of wide-ranging review of Justice’s handling of the matter, including Comey’s leadership of it.

Last week, Comey disclosed in testimony before the Senate Judiciary Committee that he had been interviewed by Justice investigators assigned to the case and expected to be questioned again. “I have a story to tell,’’ Comey told the panel.

Comey, 56, succeeded Robert Mueller, the longest serving FBI director since J. Edgar Hoover. Mueller served for 12 years before leaving the bureau.

A former chief federal prosecutor in Manhattan and former deputy attorney general, Comey won plaudits for his independence as a key player in one of the most dramatic moments during the George W. Bush administration.

With then-Attorney General John Ashcroft hospitalized in 2004 with acute pancreatitis, Deputy Attorney General Comey rushed to his boss’ bedside at George Washington Hospital when he learned that then-White House counsel Alberto Gonzales and White House chief of staff Andrew Card were trying to persuade Ashcroft to reauthorize a controversial warrantless eavesdropping program.

Since taking office, Comey has staked out the highest profile of any director since Hoover.

His public and controversial handling of the Hillary Clinton email investigation was only the latest in a string of public positions that the director took that did not always sit well with the White House and the Justice Department – including under Obama's administration.

He bluntly acknowledged law enforcement’s fraught relationship with the racial and ethnic communities in addresses at Georgetown University and in Birmingham, Ala., and has suggested that less-aggressive policing may be contributing to spikes in violent crime in some parts of the country—a position that put him at odds with former Attorney General Loretta Lynch and the Obama White House.

He drew the wrath of the tech industry and privacy advocates last year as the face of the government’s legal battle with Apple Inc., to gain access to the iPhone of San Bernardino terrorist Syed Farook. With Apple insisting that creating a way to break into the device's default encryption would be tantamount to giving the FBI a "backdoor" that could be used to break into Apple products again and again, Comey described the dispute as the “hardest problem I’ve encountered in my entire government career.’’

At another point, Comey acknowledged the vexing nature of battling homegrown violent extremists, ticking off a list of recent bloody assaults and attempted attacks that have scarred communities across the country, from Garland, Texas to Orlando, Fla.

His public concern about the FBI's capacity to confront the growing homegrown threat, prompted lawmakers to question whether the bureau had the resources to deal with it.