President Donald Trump and Israeli Prime Minister Benjamin Netanyahu participate in a joint news conference in the East Room of the White House in Washington, Wednesday, Feb. 15, 2017. (AP Photo/Pablo Martinez Monsivais)

In this image made from a video taken on Dec. 10, 2015 and made available on Tuesday, Feb. 14, 2017, US President Donald Trump's former National Security Advisor Michael Flynn, right, shakes hands with Russian President Vladimir Putin, in Moscow. Flynn, who resigned following reports that he misled White House officials about his contacts with Russia, was seen attending the 10th anniversary of the Russian television network RT in 2015 where Russian President Vladimir Putin gave a speech. A US official has told The Associated Press that Flynn was in frequent contact with Ambassador Sergey Kislyak on the day the Obama administration imposed sanctions on Russia after US intelligence reported that Russia had interfered with the US elections. (Ruptly via AP)

WASHINGTON (AP) — President Donald Trump on Wednesday blamed the media and “illegally leaked” intelligence information for bringing down his national security adviser Michael Flynn, one day after the White House said Trump had asked Flynn to resign because he misled Vice President Mike Pence about his contacts with Russia.

Flynn’s ouster has sparked a new swirl of controversy over Trump’s potential ties to Moscow. Flynn resigned Monday night — at the behest of Trump, the White House later said — after reports that he had discussed sanctions with Russia’s ambassador to the U.S. before the inauguration, despite previously denying those conversations to Pence and other top officials.

But in Trump’s first public comments on Flynn, he appeared to side with his former aide, saying it was “really a sad thing that he was treated so badly.”

Trump is said to favor Vice Admiral Robert Harward, a former Navy SEAL, as his next national security adviser, according to a White House official. Harward met with top White House officials last week and has the backing of Defense Secretary Jim Mattis.

Flynn’s ouster was a blow to a White House struggling to find its footing in Trump’s first weeks in office. The questions about Russia only deepened late Tuesday when The New York Times reported that U.S. agencies had intercepted phone calls last year between Russian intelligence officials and members of Trump’s 2016 campaign team. Current and former U.S. officials who spoke to the Times anonymously said they found no evidence that the Trump campaign was working with the Russians on hacking or other efforts to influence the election.

Trump didn’t directly address the veracity of the report during a news conference with Israeli Prime Minister Benjamin Netanyahu, but lashed out at what he called the “criminal act” of leaking information. Earlier Wednesday, Trump tweeted that “classified information is illegally given out by ‘intelligence’ like candy. Very un-American!”

The president ignored shouted questions about whether his advisers were in touch with Russian officials. His spokesman Sean Spicer said he wasn’t aware of any such contacts and panned the Times report for relying on “unnamed sources.”

Democrats called for an independent investigation into Trump’s Russia ties and urged Republicans to join them.

“This is a moment for Republicans to put country ahead of party,” Connecticut Sen. Chris Murphy said. “There’s only one or two times like this in your political career where you face a moment like this where what’s good for your country may not be good for your party.”

GOP lawmakers, led by Majority Leader Mitch McConnell, resisted, saying that the existing congressional committees will continue their investigations into Russian interference in the presidential election.

The chairmen of the House committees on oversight and the judiciary sent a letter Wednesday to the Justice Department’s inspector general urging him to investigate the leaks that led to Flynn’s removal. “We have serious concerns about the potential inadequate protection of classified information here,” Reps. Jason Chaffetz and Bob Goodlatte wrote.

Flynn maintained for weeks that he had not discussed U.S. sanctions in his conversations with Russia’s ambassador. He later conceded that the topic may have come up.

Trump initially thought Flynn could survive the controversy, according to a person with direct knowledge of the president’s views, but a pair of explosive stories in The Washington Post in recent days made the situation untenable. As early as last week, he and aides began making contingency plans for Flynn’s dismissal, a senior administration official said. While the president was said to be upset with Flynn, he also expressed anger with other aides for “losing control” of the story and making his young administration look bad.

The vice president, who had vouched for Flynn in a televised interview, is said to have been angry and deeply frustrated. Pence spokesman Marc Lotter said Pence became aware that he had received “incomplete information” from Flynn only after the first Washington Post report Thursday night. At about the same time, Pence learned that the Justice Department had warned the White House last month regarding Flynn’s conversations with Russian Ambassador Sergey Kislyak.

Flynn, in an interview with The Daily Caller News Foundation, said Monday “there were no lines crossed” in his conversations with Kislyak.

The officials and others with knowledge of the situation were not authorized to discuss the matter publicly and requested anonymity.

Ahead of the Jan. 20 inauguration, Pence and other officials insisted publicly that Flynn had not discussed sanctions in his talks with the Russian ambassador. On Jan. 26, Acting Attorney General Sally Yates contacted White House counsel Don McGahn to raise concerns about discrepancies between the public accounting and what intelligence officials knew to be true about the contacts based on routine recordings of communications with foreign officials who are in the U.S.

The Justice Department warned the White House that the inconsistencies would leave the president’s top national security aide vulnerable to blackmail from Russia, according to a person with knowledge of the discussion. The president was informed of the warnings the same day, Spicer said.

Flynn was interviewed by the FBI around the same time, according to a U.S. official who was briefed on the investigation.