Image copyright Getty/AFP Image caption Watergate reporter Carl Bernstein's story quoted sources saying Mr Trump knew of a 2016 meeting with Russians at Trump Tower

US President Donald Trump is waging a war of words with legendary Watergate reporter Carl Bernstein over a story about his ex-lawyer Michael Cohen.

On Wednesday, the president called Mr Bernstein a "sloppy" and "degenerate fool" who invented stories.

Mr Bernstein fired back, tweeting that he spent his life "bringing the truth to light" and "no taunt" could diminish that commitment.

His story reported Mr Trump knew about a 2016 meeting with Russians.

On Twitter, the president said "CNN is being torn apart from within" over refusing to admit their mistakes, adding that Mr Bernstein "is being laughed at all over the country".

Mr Bernstein, a famed journalist who covered the Watergate scandal during the Nixon presidency, responded saying he stands by his reporting.

The story in question had quoted sources as saying that Cohen, the president's former personal lawyer, was ready to testify that Mr Trump was aware of the June 2016 Trump Tower meeting between his son, Donald Trump Jr and Russians who said they had dirt on Hillary Clinton.

Cohen's attorney, Lanny Davis, revealed on Monday that he was CNN's source and has since recanted his statement.

CNN has stood by the story and Mr Bernstein, tweeting at the president: "Make no mistake, Mr President, CNN does not lie."

On Thursday, Mr Trump called for CNN president Jeff Zucker to be fired over the network's "hatred and extreme bias" towards him.

The president continued to lambast US media on Twitter, saying "they only have their hatred and agenda", adding that the media is also responsible for "fake books".

Mr Trump's clash with Mr Bernstein comes as fellow-Watergate reporter Bob Woodward is set to release a book next month detailing life inside the Trump White House.

What was the CNN story?

Mr Bernstein co-wrote an article that had multiple anonymous sources claiming Cohen said the president was aware of the June 2016 meeting.

That meeting involved Mr Trump's son, his son-in-law Jared Kushner, then-campaign chairman Paul Manafort and an influential Russian lawyer, Natalia Veselnitskaya.

In the 27 July article, CNN stated Mr Davis had declined to comment, and quoted multiple anonymous sources.

The next day, the Washington Post also reported on the claims and cited Mr Davis as a source.

On Monday, however, Mr Davis confirmed to Buzzfeed News that he was CNN's anonymous source and retracted his claims.

"I made a mistake," he said, adding that he should have been clearer to reporters that he could not personally verify the information he gave.

When Mr Davis appeared on CNN with presenter Anderson Cooper, last week, he said "the reporting of the story got mixed up".

CNN stands by its story. Trump supporters argue Mr Davis' statements undermine the original article.

Cohen's case has stoked speculation he could testify against Mr Trump in Robert Mueller's investigation into alleged Russian meddling two years ago in the US elections.

He pleaded guilty to eight counts of tax evasion, bank fraud and campaign finance crimes last week.