The White House’s national security adviser resigned Monday night and President Trump tapped retired Lt. Gen. Joseph Keith Kellogg Jr. to serve as acting adviser in his place, in the first major shakeup of the still-young administration.

Michael Flynn, the ousted adviser, admitted that he misled Vice President Mike Pence on the contents of phone calls Mr. Flynn placed to the Russian ambassador, in which they apparently discussed sanctions.

At the time, though he was working for the Trump transition team, Mr. Flynn was a private citizen, and such communications to hash out government policy are illegal.

SEE ALSO: Text of Michael Flynn’s resignation letter from national security advisor post

“Unfortunately, because of the fast pace of events, I inadvertently briefed the vice president-elect and others with incomplete information regarding my phone calls with the Russian ambassador. I have sincerely apologized to the president and the vice president, and they have accepted my apology,” Mr. Flynn said in a resignation letter released by the White House.

Top officials, apparently relying on Mr. Flynn’s account of the conversation, issued a public denial of reports that he had discussed the sanctions imposed on the Kremlin by the outgoing Obama administration over Moscow’s efforts to influence the U.S. election in Mr. Trump’s favor.

But Mr. Flynn later told White House officials the issue of sanctions may have come up. That revelation left the position of Mr. Flynn, a retired lieutenant general, untenable.

SEE ALSO: Trump says the ‘real story’ of Flynn’s downfall is ‘illegal leaks’ out of D.C.

Democrats said Mr. Flynn had to go, but said it doesn’t end the questions swirling around the Trump team over its promises to the regime in Moscow.

“These alleged contacts and any others the Trump campaign may have had with the Kremlin are the subject of the House Intelligence Committee’s ongoing investigation,” said Rep. Adam Schiff of California, the ranking Democrat on that panel.

“Moreover, the Trump administration has yet to be forthcoming about who was aware of Flynn’s conversations with the ambassador and whether he was acting on the instructions of the President or any other officials, or with their knowledge,” he said.

The Justice Department had warned the White House weeks ago of the conversations and the discrepancy between the public statements and the reality of Mr. Flynn’s behavior, according to the Associated Press.

As the reports piled up, Democrats on Capitol Hill had demanded Mr. Flynn be suspended from his security clearance and fired for his actions.

Mr. Flynn, who was fired from his job as chief of the Defense Intelligence Agency by President Obama in 2014, had been a supporter of Mr. Trump’s during the campaign. He even spoke at the Republican National Convention last summer.

After Mr. Trump’s victory in November, Mr. Flynn was one of the first personnel announcements Mr. Trump made, tapping his booster to be national security adviser.

But over the last few days the White House had given conflicting signals about his job. One senior adviser said Monday afternoon that the president maintained “full confidence” in Mr. Flynn, while another said the president was trying to figure out what to do.

Mr. Flynn is the second person on Mr. Trump’s national security team to bow out already.

Last month Monica Crowley, a GOP foreign policy expert who had previously served as online opinion editor for The Washington Times and as commentator for Fox News,announced she would forgo a senior strategist’s position with Mr. Flynn after accusations by CNN and Politico that she plagiarized some of her work.

In his resignation letter Mr. Flynn said he held “numerous” calls with foreign ministers and ambassadors during the transition period after the election but before the inauguration. He said those kinds of communications “are standard practice.”

He also left with a parting thanks to Mr. Trump, saying the president in three weeks “has reoriented American foreign policy in fundamental ways to restore America’s leadership position in the world.”

According to CNN, retired Gen. David Petraeus will be “coming in” Tuesday to discuss the position. Retired Gen. Kellogg also is a candidate for the permanent post, CNN reported.