ATHENS, Greece – Drawing a broad lesson from the election of Donald Trump, President Barack Obama said Tuesday that world leaders need to pay attention to people’s very real fears of economic dislocation and inequality in the midst of globalization.

“The more aggressively and effectively we deal with those issues, the less those fears may channel themselves into counterproductive approaches that can pit people against each other,” Obama said as he opened the last foreign tour of his presidency.

Obama, in a joint news conference with Greek Prime Minister Alexis Tsipras, said that both 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,” Obama said.

The president seemed skeptical that “the new prescriptions being offered” would satisfy the frustrations and anger evident in election. And he played a bit of defense, saying that his agenda over past eight years had dealt with economic issues head on and “the country’s indisputably better off.”

Obama added pointedly that some of the rhetoric seen in the elections was “pretty troubling and not necessarily connected to the facts.”

Tsipras, for his part, said he had refrained from rushing to criticizing Trump as some other European leaders had done, saying that the Republican’s “aggressive manner” as a candidate 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.”

Tsipras added that it was one thing to criticize Trump during the campaign and another thing now Trump will be a “major player” in the world.

The president earlier offered the Greeks reassuring words about the U.S. commitment to NATO, saying Democratic and Republican administrations alike recognize the importance of the alliance to the trans-Atlantic relationship.

Obama 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.”

Pavlopoulos, for his part, thanked Obama for U.S. support of the Greek people in a time of social and economic crisis, and said he was confident that Trump “will continue on the same path.”

Trump’s election has generated significant unease in Europe because of his tough talk during the campaign suggesting the U.S. might pull out of the NATO alliance if other countries don’t pay more.

Obama’s reassurances reflect an attempt to ease the deep concerns about Trump and the future of the United States’ treaty alliances. Yet they may be greeted with skepticism: For months throughout the campaign, Obama repeatedly assured world leaders in public and private that Trump would not be elected, only to see him emerge victorious from last week’s election.

In his meeting with Tsipras, Obama offered a welcome message of support for the Greeks as they struggle with both economic woes and a huge influx of refugees. Obama 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.”

Obama is making the first visit to Greece by a sitting U.S. president since Bill Clinton in 1999. Security was tight, with major roads shut down along Obama’s motorcade route and a ban on public gatherings and demonstrations in swaths of central Athens and a southern suburb near a seaside luxury hotel where Obama was staying. Boats were also banned from sailing near the coastline at the hotel’s location.

More than 5,000 police were deployed in the capital’s streets for the two-day visit. Left-wing and anarchist groups have planned protest demonstrations for Tuesday afternoon, while an armed anarchist group has called for “attacks and clashes” to disrupt Obama’s visit. Clinton’s visit, which came during the height of U.S. intervention in the wars ensuing from the breakup of Yugoslavia, was marked with extensive violent demonstrations.

On Wednesday, Obama is scheduled to tour the Acropolis and give a major speech about democracy and globalization before flying on to Berlin. From Germany, Obama will travel to Peru for an Asian economic summit before returning to Washington on Saturday.

Obama said he was looking forward to visiting the Acropolis because “if you come to Greece you’ve got to do a little bit of sightseeing.”