US National Security Adviser Michael Flynn has resigned over allegations he discussed US sanctions with Russia before Donald Trump took office.
Mr Flynn is said to have misled officials about his call with Russia’s ambassador before his own appointment.
It is illegal for private citizens to conduct US diplomacy.
US reports said earlier the White House had been warned about the contacts last month and had been told Mr Flynn might be vulnerable to Russian blackmail.
The national security adviser is appointed by the president to serve as his or her chief adviser on international affairs and defence.
In his letter of resignation (PDF), Mr Flynn said he had “inadvertently briefed the vice-president-elect and others with incomplete information regarding my phone calls with the Russian ambassador” late last year.
The White House has appointed Lt Gen Joseph Keith Kellogg as his interim replacement.
In his first public comments about the controversy, President Trump tweeted on Tuesday: “The real story here is why are there so many illegal leaks coming out of Washington? Will these leaks be happening as I deal on N Korea etc?”
Mr Flynn, a retired army lieutenant-general, initially denied having discussed sanctions with Ambassador Sergei Kislyak, and Vice-President Mike Pence publicly denied the allegations on his behalf.
But he came under further pressure on Monday when details of his phone call emerged in US media as well as reports the justice department had warned the White House about him misleading senior officials and being vulnerable to Russian blackmail.
According to the Washington Post, the message was delivered by then-Acting Attorney General Sally Yates, who was subsequently dismissed by President Trump for opposing his controversial travel ban.
The UK Defence Secretary, Sir Michael Fallon, said it was always best to be wary in dealing with Russia.
“We should be under no illusions, and be very clear, that Russia sees itself, not as a partner to the West, but very much as a competitor,” he told the BBC.
What is the White House saying?
Kellyanne Conway, a close aide to President Trump, told US TV networks that he had supported Mr Flynn out of loyalty but the situation had reached a “fever pitch” and had become “unsustainable”.
“By night’s end, Mike Flynn had decided it was best to resign,” she told NBC’s Today show.
“He knew he’d become a lightning rod, and he made that decision.
“We’re moving on,” she added.
How are the Russians reacting?
Kremlin spokesman Dmitry Peskov said Russia would not be commenting on the resignation.
“This is the internal affair of the Americans, the internal affair of the Trump administration,” he added. “It’s nothing to do with us.”
Other Russian lawmakers have spoken out in defence of Mr Flynn, with Senator Alexei Pushkov tweeting that he had been “forced to resign not because of his mistake but because of a full-fledged aggressive campaign”.
“Trump is the next target,” he tweeted (in Russian).
Mr Flynn had encouraged a softer policy on Russia but questions were raised about his perceived closeness to Moscow.
Is Trump implicated? – Anthony Zurcher, BBC North America reporter
From inauguration to full-blown scandal and a high-level resignation in 24 days. That simply has to be some kind of record.
Donald Trump never does anything small. If his administration is going to have a political crisis, why waste any time?
Mr Flynn has now been cut loose but that may not be enough to staunch the bleeding.
Congressional Democrats – and perhaps some Republicans – will want to find out who was informed about Mr Flynn’s contradictory stories and why nothing was done earlier. How far up the chain of command does it go?
All of this has some observers dusting off language from the mother of all presidential scandals, Watergate.
What did the president know, and when did he know it?
What happens next?
Senior Democrat Adam Schiff said Mr Flynn’s departure would not end questions about contacts between Donald Trump’s campaign and Russia.
Congressional democrats John Conyers and Elijah Cummings have demanded a classified briefing to Congress on Michael Flynn by the justice department and FBI.
Meanwhile, US House Intelligence Committee Chairman Devin Nunes told reporters on Tuesday he wants to investigate the leaks that led to Mr Flynn’s resignation.
“We in Congress need to know who authorised his actions, permitted them, and continued to let him have access to our most sensitive national security information despite knowing these risks,” their statement said.
Several House Democrats had already called on Oversight Committee Chairman Jason Chaffetz to launch an investigation into Mr Flynn’s ties to Russia.
What the US media say
Mr Flynn’s resignation had “dragged on too long”, says Fox News’s Howard Kurtz. What finally sealed the deal, he said, was the “cardinal sin” of “not being straight with his bosses, putting [Vice-President Mike] Pence in the embarrassing position of defending the hard-charging official based on an incomplete account”.
“Mike Flynn might be done – but Trump’s nightmare has just begun,” writes Richard Wolffe in the Guardian US, asking why Donald Trump had not simply fired Mr Flynn. This, he points out, was what the president had done to the woman who had warned him about his national security adviser (Ms Yates).
Chris Cillizza, of the Washington Post, takes a more favourable view of the situation, saying Mr Flynn’s resignation “proves that even for this most unorthodox of presidents, some of the old rules of Washington politics still apply”.
“It was a prototypical Washington scandal that played out like hundreds of similar ones before it. It felt, dare I say it, normal.”
Who will replace him?
While Mr Kellogg has been appointed acting national security adviser, former CIA director David Petraeus and Robert Harward, a former deputy commander of US Central Command, are also under consideration for the post, White House officials say.