Former President Barack Obama on Tuesday laid out a progressive vision for the future in direct rebuke to what he called the "politics of fear and resentment and retrenchment" that have taken hold around the world.

In remarks honoring the 100th anniversary of anti-apartheid leader Nelson Mandela's birth, delivered in South Africa a day after President Donald Trump was roundly criticized for cozying up to Russian President Vladimir Putin, Obama denounced creeping authoritarianism and warned against "strongman politics" practiced by leaders who ignore facts and "seek to undermine every institution ... that gives democracy meaning."

"We now see much of the world threatening to return to an older, more dangerous, more brutal way of doing business," he said in his highest-profile speech since leaving office.

It is a "moment in time in which two very different visions of humanity's future compete for the hearts and minds of citizens around the world," he added.

Framing his remarks as a reflection on Mandela's legacy "given the strange and uncertain times that we are in," Obama offered a rebuttal to Trump policies, such as separating migrant families at the southern U.S. border, and postures, all without mentioning the president by name.

Obama acknowledged that technology and globalization have resulted in feelings of insecurity, joblessness, and the consolidation of wealth in the hands of the few. But, he said, that is why democratic societies must work harder to counter the political forces that would exploit grievance and stoke "barely hidden racial nationalism."

At one point, he invoked the World Cup-winning French soccer team, which counts the children of immigrants among its members, and warned that countries that engage in xenophobia "eventually ... find themselves consumed by civil war."