Michael Flynn has resigned as national security adviser following reports that he misled senior Trump administration officials, including Vice President Mike Pence, about the nature of talks he held with the Russian ambassador in December before he took office.

Flynn submitted his resignation in a letter Monday evening in which he acknowledged having “inadvertently briefed the vice president-elect and others with incomplete information regarding my phone calls with the Russian ambassador.” He said he had apologized both to Pence and President Trump and that they had accepted his apology. But amid a firestorm of criticism from Republicans and Democrats, as well as questions about whether he may have broken the law, Flynn quit anyway.

“I am tendering my resignation,” he wrote, “honored to have served our nation and the American people in such a distinguished way.”

Keith Kellogg, who like Flynn is a retired general, will serve as acting national security adviser, Trump announced in a statement shortly after 11 p.m. Eastern. He had led the defense team during the Trump transition. David Petraeus, the retired general and former CIA director who pleaded guilty to sharing classified information with his biographer and lover, is reportedly among the candidates for the permanent position, as is Vice Admiral Robert Harward.

Coming less than a month into Trump’s presidency, Flynn’s departure is the latest and most glaring sign of upheaval for a White House riven by drama and staff infighting. It followed multiple published reports on Monday night that officials at the Justice Department had warned the White House that Flynn had misled Pence by denying that he had discussed the possible relaxation of sanctions against Russia once Trump took office.

The Washington Post reported that Sally Yates, then the acting attorney general, told Don McGahn, the White House counsel that Flynn could be susceptible to blackmail based on the transcript of his intercepted call with Sergei Kislyak, the Russian ambassador. The FBI has been investigating ties between the Trump campaign and the Russian government. Yates, according to the report, thought Flynn might have violated the Logan Act barring private citizens from negotiating with foreign governments that have an ongoing dispute with the United States. Trump fired Yates 10 days into his presidency after she refused to defend the executive order he signed on immigration, which is now being held up by the courts. The New York Times reported Monday that the Army had separately been investigating whether Flynn took money from the Russian government as part of a trip he took to Moscow in 2015; the payments could have violated the Emoluments Clause of the Constitution.

A retired lieutenant general in the Army, Flynn had served for two years as director of the Defense Intelligence Agency before he was forced out after repeatedly clashing with other members of the Obama administration. He became an enthusiastic and frequently bombastic surrogate for Trump’s campaign, giving a lengthy speech at the Republican National Convention that prompted delegates to begin chanting, “Lock Her Up!” in reference to Hillary Clinton.

Congressional Democrats who had demanded Flynn’s ouster in recent days reacted to his resignation by calling for immediate briefings from the Trump administration. “Now, we in Congress need to know who authorized his actions, permitted them, and continued to let him have access to our most sensitive national security information despite knowing these risks,” said Representatives Elijah Cummings of Maryland and John Conyers of Michigan. “We need to know who else within the White House is a current and ongoing risk to our national security.”

Earlier on Monday, Trump officials had sent mixed signals about Flynn’s standing. Kellyanne Conway, who serves as counselor to the president, said on MSNBC that Flynn retained Trump’s full confidence. An hour later, press secretary Sean Spicer told reporters that the White House was reviewing Flynn’s situation.

A few hours after that, he was gone.