President Donald Trump has criticised intelligence officials and the media over what he called "very, very unfair" treatment of his ousted national security adviser Michael Flynn and for "illegally leaked" information about reported contacts between his campaign advisers and Russian officials.

Mr Trump's comments come amid a new swirl of controversy over his ties to Russia. Mr Flynn was forced to resign this week after misleading Vice President Mike Pence and other Trump aides about his contacts with Russia's ambassador to the US before the inauguration.

In his first public comments on Mr Flynn's firing, Mr Trump said it was "really a sad thing that he was treated so badly". He spoke during a White House news conference with Israeli prime minister Benjamin Netanyahu.

Late on Tuesday, The New York Times reported that US agencies had intercepted phone calls last year between Russian intelligence officials and members of Mr Trump's 2016 campaign team. Current and former US officials who spoke to the Times anonymously said they found no evidence that the Mr Trump campaign was working with the Russians on hacking or other efforts to influence the election.

Mr Trump did not directly address the veracity of the report, but lashed out at what he called the "criminal act" of leaking information. Earlier on Wednesday, Mr Trump tweeted that "classified information is illegally given out by 'intelligence' like candy. Very un-American!"

The White House has not commented on the report, though officials denied as recently as Tuesday afternoon that campaign advisers had communicated with Russia during the election.

The White House said Mr Flynn was fired not because of his communications with the Russian ambassador, but because he had not been truthful with Mr Pence about the content of those discussions. Mr Flynn maintained for weeks that he had not discussed sanctions in the calls, but later conceded that the topic may have come up.

White House officials said they conducted a thorough review of Mr Flynn's interactions, including transcripts of calls secretly recorded by US intelligence officials, but found nothing illegal.

Mr Pence, who had vouched for Mr Flynn in a televised interview, is said to have been angry and deeply frustrated.

At the White House on Tuesday, press secretary Sean Spicer told reporters: "The evolving and eroding level of trust as a result of this situation and a series of other questionable incidents is what led the president to ask General Flynn for his resignation."

Mr Flynn, in an interview with The Daily Caller News Foundation, said on Monday "there were no lines crossed" in his conversations with Russian Ambassador Sergey Kislyak.

The explanation of the episode left many questions unanswered, including why Mr Trump did not alert Mr Pence to the matter and why Mr Trump allowed Mr Flynn to keep accessing classified information and taking part in the president's discussions with world leaders up until the day he was fired.

White House officials also struggled to explain why Trump counsellor Kellyanne Conway had declared the president retained "full confidence" in Mr Flynn just hours before the adviser had to submit his letter of resignation.

Mr Flynn's firing heightened questions about the president's friendly posture toward Russia. Democrats called for investigations into Mr Flynn's contacts, and Republican Senator Lindsey Graham said Congress needed to know whether he had been acting with direction from the president or others.

Trump initially thought Mr 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 Mr Flynn's dismissal, a senior administration official said. While the president was said to be upset with Mr Flynn, he also expressed anger with other aides for "losing control" of the story and making his young administration look bad.

Mr Pence's spokesman Marc Lotter said Mr Pence became aware that he had received "incomplete information" from Flynn only after the first Washington Post report on Thursday night. Mr Pence learned about the Justice Department warnings to the White House around the same time.

Ahead of the January 20 inauguration, Mr Pence and other officials insisted publicly that Mr Flynn had not discussed sanctions in his talks with Russian Ambassador Sergey Kislyak. On January 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 US.

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, Mr Spicer said.

Mr Flynn was interviewed by the FBI around the same time.

Mr McGahn, along with chief of staff Reince Priebus and strategist Steve Bannon, also questioned Mr Flynn multiple times in the ensuing weeks, a White House official said. Top aides also reviewed transcripts of Mr Flynn's contacts with the ambassador, according to a person with knowledge of the review process.

At the same time, the official said Trump aides began taking steps to put some distance between the president and Mr Flynn. CIA director Mike Pompeo and retired Lt Gen Keith Kellogg, a top Flynn aide, started taking part in Mr Trump's daily security briefings.