Barack Obama said on Tuesday the world should resist cynicism over the rise of strongmen, in an apparent reference to populist leaders who hold power in a number of countries.

The Democratic former US president did not name his Republican successor, Donald Trump, but the speech was among the most pointed comments he has made about politics since leaving office in January 2017.

"Just as people spoke about the triumph of democracy in the 90s, people now are talking about the triumph of tribalism and the strong man. But we need to resist that cynicism," Obama said in a speech in Johannesburg to mark the 100th anniversary of the birth of Nelson Mandela.

Some of Obama's language echoed that of Trump's critics.

"Too much of politics today seems to reject the very concept of objective truth. People just make stuff up. We see it in the growth of state-sponsored propaganda, we see it in internet-driven fabrications, in the blurring of lines between news and entertainment," Obama said.

"We see the utter loss of shame among political leaders, where they are caught in a lie and they just double down and they lie some more," he said.

Obama said there were far-right parties in the West that have platforms of protectionism and closed borders but also a "barely hidden racial nationalism".

Since leaving the White House, Obama has largely avoided direct involvement in US politics and has refrained from criticising Trump. Some Democrats say he should play a more direct role.

Obama addresses the event. Photo: ReutersObama addresses the event. Photo: Reuters

On Monday Trump sided with Russian President Vladimir Putin over alleged Russian meddling in the 2016 US presidential election, casting doubt on the findings of his own US intelligence agencies and sparking a storm of criticism at home.

During his speech, given in a stadium to thousands of politicians, businesspeople and students, Obama lauded Mandela's life of sacrifice and commitment to social justice.

Mandela, a giant of the struggle against apartheid who served as South Africa's president from 1994 to 1999, died in 2013 aged 95.

Obama, who also visited Kenya this week, also praised South Africa's current president, Cyril Ramaphosa, saying he had instilled "new hope" among South Africans.

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.