US President Donald Trump knew for weeks that national security adviser Michael Flynn had misled the White House about his contacts with Russia but did not immediately force him out, an administration spokesman has said.

Mr Trump was informed in late January that Mr Flynn had not told Vice President Mike Pence the whole truth about conversations he had with Russia's ambassador to the United States before Mr Trump took office, White House spokesman Sean Spicer said.

Mr Flynn quit last night after Mr Trump asked for his resignation, Mr Spicer said. "The issue pure and simple came down to a matter of trust,"

The departure was another disruption for an administration already repeatedly distracted by miscues and internal dramas since the Republican businessman assumed the presidency on 20 January

Politicians, including some leading Republicans, called for a deeper inquiry into not just Mr Flynn's actions but broader White House ties to Russia.

It's with a heavy heart that I've tendered my resignation to @POTUS. It's been an honor & privilege to serve. Thank you all for your support pic.twitter.com/WtOfRhC9XE — Michael Flynn (@GenMikeFlynn) February 14, 2017

Mr Trump has long said that he would like improved relations with Russian President Vladimir Putin.

Representative Adam Schiff, the top Democrat on the House of Representatives Intelligence Committee, said Mr Trump only moved against Mr Flynn because of media attention to the issue, and not because of concern at any wrongdoing by the former lieutenant general.

"The reason they lost faith or trust in General Flynn only last night when they knew for weeks that he had been lying was that it became public," Mr Schiff told MSNBC.

A timeline of events outlined by Mr Spicer and a US official showed that Mr Trump had known for weeks about Mr Flynn misleading the vice president.

Mr Trump has often boasted of his eagerness to get rid of subordinates. But he was not quick to fire Mr Flynn, a strong advocate of better relations with Russia and a hard line against Islamist militants.

The Justice Department warned the White House in late January that Mr Flynn had misled Mr Pence by denying to him that he had discussed US sanctions on Russia with Ambassador Sergei Kislyak, a potentially illegal act, a US official said.

Mr Flynn did talk about sanctions with the diplomat, whose calls were recorded by US intelligence officials, the official said. But Mr Pence went on television in mid-January and denied that Mr Flynn had discussed sanctions.

Mr Spicer stressed that the administration believed there was no legal problem with Mr Flynn's conversations with Mr Kislyak, but rather an issue over the president's trust in his adviser.

He said the Justice Department sought to notify the White House counsel on 26 January about the discrepancies in Mr Flynn’s accounts.

"The White House counsel informed the president immediately. The president asked them to commit a review of whether there was a legal situation there. That was immediately determined there wasn't. That was what the president believed at the time from what he had been told and he was proved to be correct," Mr Spicer told reporters.

"We got to a point not based on a legal issue, but based on a trust issue," he said.

Mr Flynn's conversations with the ambassador took place around the time that then-President Barack Obama imposed sanctions on Russia, charging that Moscow had used cyber attacks to try to influence the 2016 presidential election in Mr Trump's favour.

A US official familiar with the transcripts of the calls with the ambassador said Mr Flynn indicated that if Russia did not retaliate in kind for Obama's 29 December order expelling 35 Russian suspected spies and sanctioning Russian spy agencies, that could smooth the way toward a broader discussion of improving US-Russian relations once Mr Trump took power.

Retired General Keith Kellogg, who has been chief of staff of the White House National Security Council, was named the acting national security adviser while Mr Trump determines who should fill the position.

Mr Kellogg, retired General David Petraeus, a former CIA director, and Robert Harward, a former deputy commander of Central Command, are under consideration for the position, a White House official said.

Mr Harward was described by officials as the leading candidate.