David Cameron has joined the chorus criticising US President Donald Trump for his tirades against the media, saying his attacks on "fake news" was undermining democracy.

In his first public speech since stepping down after his failed attempt to win a vote to stay in the European Union last year, the former prime minister said Mr Trump was corrupting society and diverting attention from real abuses through his attacks on outlets like CNN and the BBC.

“President Trump: ‘fake news’ is not broadcasters criticising you, it's Russian bots and trolls targeting your democracy, pumping out untrue stories day after day, night after night,” Mr Cameron said at an anti-corruption lecture hosted by Transparency International and law firm Clifford Chance in London.

“When you misappropriate the term fake news, you are deflecting attention from real abuses. Ignoring what’s happening on social media is facilitating a form of corruption that is undermining democracy.”

Mr Cameron championed the fight against corruption and pushed through legislation strengthening the hand of law enforcement officials.