US President Donald J. Trump. Drew Angerer/Getty Images President Donald Trump on Tuesday morning assailed government officials who anonymously leaked information about Michael Flynn to the media, his first public comments since the embattled national security adviser resigned from his post on Monday.

"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?" Trump said on Twitter.

Flynn resigned as national security adviser on Monday night after just 24 days on the job, the shortest tenure anyone has ever served in the role. The resignation came amid an uproar over talks he had had with a Russian diplomat, the content of which he didn't fully disclose to the administration, and followed a Washington Post report that said the White House was warned that he could be vulnerable to blackmail.

Newspapers such as The Post and The New York Times relied on unnamed government sources to shed light on what was taking place behind the scenes in the Trump White House, reportedly angering Trump and prompting him to lash out on Twitter against leakers.

The president's sentiment about leakers echoed a narrative that has started to play out in media outlets friendly to him.

The website Breitbart, whose former chairman, Steve Bannon, now serves as the White House chief strategist, credited leakers in part for the resignation and said it "suggests that someone with access to that information also has a political axe to grind."

"Every story about Flynn published over the weekend, or on Monday, contains multiple anonymous sources, some of which flatly contradict other anonymous sources," another Breitbart story said. "That state of affairs will itself become an enduring narrative about the Trump White House if it doesn't bring the leaks under control."

The narrative was similar on Fox News. The outlet ran a story questioning why information was leaked to the media, and Laura Ingraham, a conservative talk-show host and Trump supporter, said on the network that Flynn's resignation "really was the death by a thousand leaks."

The Post reported on Monday that Trump ordered an internal investigation to determine who was leaking information to the media.