President Donald Trump spent a large part of a major speech on Friday attacking the media, in part for their use of anonymous sources – but he used unnamed sources to make repeated false claims about Barack Obama.

Mr Trump’s Twitter feed reveals at least five occasions where he cited anonymous sources to make racially charged slurs that President Obama was not born in the US.

In August 2012, Mr Trump claimed that “an extremely credible source” had called his office to tell him Mr Obama’s birth certificate was “fake”.

Attacks on the media have been a prominent feature of Mr Trump’s early days in the White House with relations appearing to sour further with his recent decision to ban highly respected organisations, including the BBC and the Guardian, from a press briefing.

American outlets denied access to the briefing with White House spokesman Sean Spicer include ABC, CNN and the New York Times – which Mr Trump has repeatedly branded “fake news”.

CNN host Anderson Cooper hosted a discussion in which he pointed to Mr Trump’s hypocrisy.

“Just keeping him honest on this whole anonymous sources thing.

“We actually looked at the President’s Twitter feed and we discovered at least five instances in which he questioned President Obama’s citizenship when then citizen Trump quoted an extremely credible source or a confidential source.”

In a speech to the Conservative Political Action Conference in Maryland, Mr Trump reignited his war of attrition with the media.

“I saw one story recently where they said, ‘Nine people have confirmed.’ There are no nine people. I don’t believe there was one or two people. Nine people …They make up sources.

“We have to fight it folks, we have to fight it.

“They’re very smart, they’re very cunning and they’re very dishonest.”

Insisting he is not “anti-media”, Mr Trump said: “I am only against the fake news or press… I’m against the people that make up stories and make up sources. They shouldn’t be allowed to use a story unless they put their name out there.”

Appearing on CNN, Watergate journalist Carl Bernstein whose dogged investigation helped bring down President Nixon, called for more investigative journalism to hold President Trump to account for his actions, both past and present.

“We are in the middle of the ultimate battle of the cultural wars with Donald Trump, and it’s going to go on and on, and it’s going to be scorched earth.

“We need in-depth reporting, and we’re doing a great deal of it but we need to go even deeper. That’s our obligation here.”

Mr Trump has railed against the number of leaks coming out of Washington – but host Mr Cooper claimed on CNN that Mr Trump – according to reports – “used to call up the White House to drop items about himself using a fake name.”

CNN’s chief political analyst Gloria Borger said that as a businessman, Mr Trump was used to being in control through the routine signing of non-disclosure agreements with business associates or former employees.

“But you cannot do that with a Government. You cannot tell everyone they’re not allowed to leak … If there are leaks coming from the administration, he wants to be the one who does it.”

And Ms Borger suggested there could be another reason for Mr Trump’s repeated attacks against the mainstream media.