US President Donald Trump has defended his decision to fire FBI director James Comey, who was “terminated” while speaking to agents.

Trump asserted in a flurry of tweets that both Democrats and Republicans “will be thanking me”.

He did not mention any effect the dismissal might have on FBI and congressional investigations into contacts between his 2016 election campaign and Russia.

In brief remarks to reporters in the Oval Office, Trump said only that he fired Comey “because he was not doing a good job”.

The abrupt firing of Comey threw into question the future of the FBI’s investigation into the Trump campaign’s possible connections to Russia.

It also raised suspicions of an underhanded effort to hinder a probe that has shadowed the administration from the outset. Trump has ridiculed the investigations as “a hoax” and denied any campaign involvement with the Russians.

Meanwhile, Trump yesterday welcomed Vladimir Putin’s top diplomat to the White House, marking his highest level face-to-face contact with a Russian government official since taking office.

Foreign Minister Sergey Lavrov entered via the exclusive West Executive entrance, out of range of reporters.

Before that session, Lavrov stopped at the State Department to see Secretary of State Rex Tillerson, who said the get-together was a chance for the two to “continue our dialogue” and “exchange of views” that they started last month in Moscow.

During that trip, Tillerson said relations with Russia were at a low and needed to be rebuilt.

Democrats compared Comey’s ousting to President Richard Nixon’s “Saturday Night Massacre” during the Watergate investigation and renewed calls for the appointment of a special prosecutor.

Some Republicans also expressed serious concern.

Senate Democratic leader Chuck Schumer, of New York, urged Attorney General Jeff Sessions and his deputy, Rod Rosenstein, to appear before the Senate to answer questions about the circumstances surrounding Trump’s actions.

However, Senate majority leader Mitch McConnell brushed aside calls for a special prosecutor, saying a new investigation into Russian meddling would only “impede the current work being done”.

He noted that Democrats had repeatedly criticised Comey in the past and some had called for his removal.

Trump made a similar case on Twitter, saying Comey had “lost the confidence of almost everyone in Washington”, adding: “When things calm down, they will be thanking me!”

Vice-president Mike Pence said at the Capitol that Trump had made “the right decision at the right time”.

The Justice Department said Sessions was interviewing candidates to serve as an interim replacement. Comey’s deputy, FBI veteran Andrew McCabe, became acting director after Comey was fired.

In his brief letter to Comey, Trump said his sacking was necessary to restore “public trust and confidence” in the FBI.

The administration paired the letter with a scathing review by Rosenstein of how Comey handled the investigation into Democrat Hillary Clinton’s email practices, including his decision to hold a news conference announcing its findings and releasing “derogatory information”

about Clinton.

While Comey has drawn anger from Democrats since he reopened the email investigation in the closing days of last year’s campaign, they did not buy that justification for his firing.

Several Republicans joined them in raising alarm over how it could affect probes into possible coordination between Trump associates and Russia to influence the 2016 presidential election.

In one of the strongest statements by Republicans, Senator Richard Burr of North Carolina, chairman of the Senate intelligence committee, said: “I am troubled by the timing and reasoning of director Comey’s termination.

“His dismissal further confuses an already difficult investigation by the committee.”

Schumer told Trump in a phone call he thought dumping Comey was a mistake. Yesterday, Trump labelled the Senate minority leader “Cryin’ Chuck Schumer”.

Trump will now appoint a successor at the FBI, which has been investigating since late July, who will almost certainly have an impact on how the investigation moves forward and whether the public will accept its outcome.

It was only the second firing of an FBI director in history. President Bill Clinton dismissed William Sessions amid allegations of ethical lapses in 1993.

Democrats compared the ousting to Nixon’s decision to fire the independent special prosecutor overseeing the Watergate investigation in 1973, which prompted the resignations of the Justice Department’s top two officials.

“This is Nixonian,” Senator Bob Casey declared on Twitter.

“Outrageous,” said Oregon Senator Ron Wyden, calling for Comey to immediately be summoned to testify to Congress about the status of the Trump-Russia investigation.

Republican Senator John McCain said Congress must form a special committee to investigate Russia’s interference in the election.

Trump, in his letter to Comey, thanked Comey for telling him three times “that I am not under investigation”.

The FBI has not confirmed that Comey ever made those assurances to the President.

In public hearings, Comey has declined to answer when asked if Trump was under investigation, urging politicians not to read anything into that statement.

Comey, 56, was nominated by Barack Obama for the FBI post in 2013 on a 10-year term, though that appointment does not ensure a director will serve the full term. Praised frequently by both parties for his independence and integrity, he spent three decades in law enforcement.

Before the recent controversies, the former deputy attorney general in the George W Bush administration was perhaps best known for a remarkable 2004 stand-off with top officials over a federal domestic surveillance programme.

In March of that year, Comey rushed to the hospital bed of attorney general John Ashcroft to physically stop White House officials in their bid to get his ailing boss to reauthorise a secret no-warrant wire-tapping programme.

But his prominent role in the 2016 presidential campaign raised questions about his judgment and impartiality.

Although the FBI did not recommend charges against Clinton for mishandling classified information, Comey was blisteringly critical of her decision to use a personal email account and private internet server during her four years as secretary of state.

Comey strongly defended his decisions during a Senate judiciary committee hearing last week.

He said he was “mildly nauseous” at the thought of having swayed the election but also said he would do the same again.

Clinton has partially blamed her defeat on Comey’s disclosure to Congress less than two weeks before election day that the email investigation would be revisited.

Comey later said the FBI, again, had found no reason to bring any charges.

Meanwhile, three US officials have said Comey told politicians that he asked the Justice Department for more money for the bureau’s investigation into Russia’s election meddling.

The officials said Comey told politicians he had made the request to Rosenstein.

The Justice Department has denied that Comey asked for more resources.