Mr Obama was speaking after talks with Greek PM Alexis Tsipras in the capital, Athens, as part of a final tour that also takes in Germany and Peru.

Nato reassurance

He said again that he had been surprised by Mr Trump's victory.

Mr Obama said part of the result was down to "natural desires for change if you've had an incumbent who's been there for eight years".

"At times of significant stress, people are going to be looking for something and they may opt for change even if they are not entirely confident what that change will bring."

He added: "The lesson I draw is that we have to deal with issues like inequality, economic dislocation, people's fears that their children will not do as well as they have."

Mr Obama said the UK's vote to leave the EU and the US vote showed that people generally were now "less certain of their national identities and place in the world" and that had produced populist movements both on the left and the right.

He said a suspicion of globalisation and elites, wrapped up in issues of religious or ethnic or cultural identity was "a volatile mix".

He said: "Now we need to satisfy the people who are fearful, angry or concerned and that's going to be a pretty big test."

Mr Obama insisted his vision - where "the future will be decided by what we have in common, rather than what leads us into conflict" - was the right one.

He also said he was responsible for facilitating a good transition, presenting to Mr Trump his best ideas about how to move the country forward.

Mr Obama will be using the European leg of his trip to try to reassure leaders about future US commitment to its international alliances.

Analysis by James Reynolds, BBC News, Athens

For the first 30 minutes of their news conference, Mr Obama and Mr Tsipras managed to avoid talking about President-elect Trump. Given the drama of last week's election result, that surely sets some kind of record.

But the two leaders soon faced questions about Mr Trump's impact. Mr Obama chose his words carefully. He obeys two American traditions which come together on this trip: an outgoing president is normally gracious about his successor and a president on a foreign trip doesn't criticise his opponents back home.

Mr Tsipras - who himself came to power as the leader of a populist movement - said he knew very little about Mr Trump and hadn't read his book The Art of the Deal. The Greek PM then aligned himself with the position laid out by Mr Obama since the election result - that the United States is bound by a series of commitments to Europe and Nato that will endure.

But Greece will be worried. President Obama has advocated debt relief for this country. President-elect Trump may be unlikely to do the same.

Before leaving the US, Mr Obama said President-elect Trump had "expressed a great interest" in maintaining the US commitment to Nato, although during the campaign the Republican had said he might abandon a guarantee of protection for fellow Nato countries.

Article 5 of the Nato treaty commits allies to come to the aid of a member state under attack. Mr Trump's statements had alarmed the Baltic states, which fear Russian aggression.

Protest marches

Much of Mr Obama's news conference with Mr Tsipras concerned the Greek economy.

Mr Tsipras praised Mr Obama for his support and for pursuing an economic policy in the US that focused on quantitative easing and job creation, rather than on the austerity measures favoured in Europe.