US President Donald Trump has fired FBI director James Comey, the man who leads the agency charged with investigating his campaign's ties with Russia.

The surprise dismissal of Mr Comey, who played a controversial role in the 2016 presidential election, is sure to send shockwaves through Washington.

"The president has accepted the recommendation of the attorney general and the deputy attorney general regarding the dismissal of the director of the Federal Bureau of Investigation," White House spokesman Sean Spicer told reporters.

A search for a new FBI director was to begin "immediately," the White House said in a statement.

In a letter, Mr Trump told Mr Comey: "You are hereby terminated and removed from office, effective immediately.

"While I greatly appreciate you informing me, on three separate occasions, that I am not under investigation, I nevertheless concur with the judgment of the Department of Justice that you are not able to effectively lead the Bureau.

"It is essential that we find new leadership for the FBI that restores public trust and confidence in its vital law enforcement mission," Mr Trump said.

FBI directors are appointed for a single ten-year term. Mr Comey, 56, who is popular among rank-and-file agents, was appointed four years ago.

Mr Comey has been embroiled in controversy surrounding his probe into whether Democratic candidate Hillary Clinton's use of a private email server while US secretary of state during president Barack Obama's first term compromised national security.
He said in July that the case should be closed without prosecution, but then declared - 11 days before the 8 November election - that he had reopened the investigation because of a discovery of a new trove of Clinton-related emails.
It was a decision Democrats believe cost Mrs Clinton victory.
The White House released a memo by Deputy Attorney General Rod Rosenstein about Mr Comey's actions.
"I cannot defend the Director's handling of the conclusion of the investigation of Secretary Clinton's emails, and I do not understand his refusal to accept the nearly universal judgment that he was mistaken," Mr Rosenstein wrote.
Mr Rosenstein identified several areas in which he said Mr Comey had erred, saying it was wrong of him to "usurp" then-attorney general Loretta Lynch's authority by announcing the initial conclusion of the email case on 5 July.
Mr Comey "announced his own conclusions about the nation's most sensitive criminal investigation, without the authorisation of duly appointed Justice Department leaders," Mr Rosenstein wrote.

Mr Comey also "ignored another longstanding principle" by holding a news conference to "release derogatory information about the subject of a declined criminal investigation".
Mr Comey told the Senate Judiciary Committee last Wednesday it made him "mildly nauseous" to think his announcement of the reopening of an investigation into Mrs Clinton's emails affected the 2016 presidential election, but he had no regrets and would make the same decision again.