President Barack Obama has said world leaders need to pay attention to people's fears of economic dislocation and inequality in the midst of globalisation.
Drawing a broad lesson from the election of Donald Trump, he said: "The more aggressively and effectively we deal with those issues, the less those fears may channel themselves into counter-productive approaches that can pit people against each other."
As he opened the last foreign tour of his presidency, he joined Greek prime minister Alexis Tsipras for a joint press conference in Athens, and said Mr Trump's election and the British vote to leave the European Union reflected the need to deal with "people's fears that their children won't do as well as they have".
"Sometimes people just feel as if we want to try something and see if we can shake things up," Mr Obama said.
The president seemed sceptical that "the new prescriptions being offered" would satisfy the frustrations and anger evident in the US election, and also claimed his agenda over the past eight years had dealt with US economic issues head on and "the country's indisputably better off".
He added pointedly that some of the rhetoric in the elections was "pretty troubling and not necessarily connected to the facts".
Mr Tsipras said he had refrained from rushing to criticising Mr Trump as some other European leaders had done, saying the Republican's "aggressive manner" might be different as president. He predicted that "in the near future not much is going to change in the relations between the EU, Greece and the United States of America".
He added that it was one thing to criticise Mr Trump during the campaign and another thing now he will be a "major player" in the world.
Mr Obama earlier offered the Greeks reassuring words about the US commitment to Nato, saying Democratic and Republican administrations alike recognise the importance of the alliance to the transatlantic relationship.
He told Greek President Prokopis Pavlopoulos that a strong Nato is of "utmost importance" and would provide "significant continuity even as we see a transition in government in the United States".
Mr Pavlopoulos thanked Mr Obama for US support of the Greek people in a time of social and economic crisis, and said he was confident Mr Trump "will continue on the same path".
Mr Obama's reassurances reflect an attempt to ease the deep concerns about Mr Trump and the future of America's treaty alliances. Yet they may be greeted with scepticism: For months throughout the campaign, Obama repeatedly assured world leaders in public and private that Mr Trump would not be elected, only to see him emerge victorious from last week's election.
In his meeting with Mr Tsipras, he offered a welcome message of support for the Greeks as they struggle with economic woes and a huge influx of refugees. He pledged to keep pressing his view that "austerity alone cannot deliver prosperity and that it is going to be important both with respect to debt relief and other accommodative strategies to help the Greek people in this period of adjustment".
Meanwhile, minor clashes broke out in Athens as left-wing demonstrators protesting against the visit by Mr Obama tried to break a police cordon and were repelled with tear gas.
No injuries or arrests were reported. About 3,000 anarchists, left-wing group supporters and students marched through the city centre in a demonstration originally planned to reach the US Embassy in another part of town.
A second planned protest by Communist party supporters is due to start later.
All demonstrations have been banned in a large area of central Athens during the two-day visit. Riot police blocked the marchers from the part of the city where Mr Obama will be, parking buses across roads and manning cordons.
Greek authorities have deployed more than 5,000 police for the visit. The riot squad is on high alert for violence, and an armed anarchist group has called for "attacks and clashes" to disrupt the visit.
There is a strong anti-American tradition among Greek left-wingers who still resent US support for Greece's 1967-74 military dictatorship.
Mr Obama's visit comes just two days before the country's main annual anti-American demonstrations, which commemorate the bloody suppression by military authorities in 1973 of a pro-democracy student uprising.
The last visit to Greece by a US president was by Bill Clinton in 1999. It was marred by extensive street fighting between anarchists and riot police.