Barack Obama has used his first high-profile speech since stepping down as US President to say “you have to believe in facts”.
His comments are seen as a riposte to the current US administration’s use of “alternative facts”.
“Without facts there is no basis for co-operation,” he said at the annual Nelson Mandela lecture in South Africa.
“If I say this is a podium and you say this is an elephant, it is going to be hard for us to co-operate.”
Mr Obama said that he could find common ground with people who disagree with the Paris accord on climate change – which Donald Trump wants to pull the US out of – if they have an argument based on fact.
But, he added: “I can’t find common ground if someone says climate change is not happening when almost all the world’s scientists say it is. If you start saying it is an elaborate hoax, where do we start?”
A moment later, Mr Obama told the audience of 15,000 people: “It used to be if you caught them [politicians] lying, they said: ‘Oh man’. Now they just keep on lying.”
His speech is part of events to mark 100 years since the birth of former South Africa President Nelson Mandela, who died in 2013 aged 95.
Both men were the first black presidents of their countries.
Speaking on Tuesday in South Africa’s main city, Johannesburg, Mr Obama also said politicians using “politics of fear, resentment, retrenchment” were rising “at a pace unimaginable just a few years ago”.
Mr Obama has said he was “one of the countless millions who drew inspiration from Nelson Mandela’s life”.
Mandela led the fight against white minority rule in South Africa. He was imprisoned for 27 years before he became the country’s first democratically elected president in 1994.
As a student, Mr Obama called the fight against apartheid “a struggle that touches each and every one of us”, and encouraged his university to drop its investments in South Africa.
Previous speakers at the event include US entrepreneur and philanthropist Bill Gates, French economist Prof Thomas Piketty, former Liberian President Ellen Johnson-Sirleaf, Kenyan Nobel laureate and political activist Wangari Maathai, ex-UN Secretary General Kofi Annan and former US President Bill Clinton.
Since its beginning in 2003, global leaders have used the lecture to speak about issues affecting South Africa, the continent and the world.
Mr Obama and his family spent eight days in Tanzania’s famous Serengeti National Park, before Mr Obama travelled to Kenya at the weekend to visit his ancestral home, and now to South Africa.