German Chancellor Angela Merkel assailed growing nationalism in Europe ahead of a continent-wide election in May, expanding on a theme that’s dominating the final chapter of her tenure.

Speaking alongside Alexis Tsipras on her first trip to Athens in five years, Merkel waded into Balkan politics and embraced the Greek prime minister as an ally in a region where outside powers from Turkey and Russia to China are vying for influence. While the two leaders are from different European political families, they have “a common foundation,” she said.

“That includes the deep conviction that cooperation with each other is in any case better than nationalism, which has so often led us in Europe to catastrophe,” Merkel told reporters in the Greek capital on Thursday.

The comments reflect geopolitical shifts and the surge of populism across the European Union since Merkel and European institutions imposed fiscal austerity on Greece as the price of bailouts to keep it in the euro area.

This time, Merkel backed Tsipras’s efforts to resolve a name dispute with Greece’s northern neighbor, the Republic of Macedonia, which could clear that country’s path to joining the North Atlantic Treaty Organization.

“It establishes clarity for us all,” Merkel said.

Merkel’s first foreign trip this year is part of a new phase of her chancellorship after she surrendered her post as Christian Democratic Union party leader in October and said she won’t run for a fifth term as chancellor.

The two-day program, a contrast with her brief stopover in April 2014, is a reminder of the geopolitical crises that shaped Merkel as Europe’s preeminent leader—the euro crisis and Europe’s migration turmoil. She returned to her ambition to defend the postwar global order against an onslaught of populist movements and the unpredictable presidency of Donald J. Trump.

Confident future

Tsipras, who was in opposition during Merkel’s last visit, was asked about his demand back then that Merkel go back to Germany.

“Quite a lot of things have changed,” the Greek premier responded. “The difficult questions are behind us; Greece is a different country. Yes, with deep wounds, but it’s a country that sees the future with confidence.”