Angela Merkel arrived in Greece on Thursday for a two-day visit to the country that has posed some of the greatest challenges of her time at the helm of Europe’s powerhouse economy.

It is a trip heavy with symbolism for a leader whose policies have defined the continent and who has announced she will leave office at the end of her term in 2021.

And, from the start when prime minister Alexis Tsipras pronounced that the visit marked “the end of a difficult cycle between our two countries,” vastly different in mood, colour and tone to her previous stopovers at the height of the euro crisis.

Then, thousands took to the streets, some dressed in Nazi garb and giving the Hitler salute, in displays of protest against the woman widely deplored as the queen of economic austerity – the price of Berlin bailing out debt-stricken Athens.

This time demonstrations in downtown Athens are banned and it was smiles and warm embraces that greeted the chancellor. As prime minister, Tsipras, the once fiery leftist who relished taunting “Madam Merkel” as her most trenchant critic in opposition, went out of his way to issue platitudes as Merkel, in green jacket and smiling irrepressibly, sat before him at the start of talks.

Late on Monday, the Greek leader said Merkel had long wanted to visit Athens in what would amount to a victory tour as she approaches the end of her time in office.

“She has wanted to come for some time because she considers it also her own success that while Greece was on the verge of bankruptcy in 2015, it has managed to recover and of course remain in the central core of the European Union,” he told the TV channel Open Beyond.

Despite the animus that had initially marred ties, both had built up a “relationship of trust,” he said, using unusually warm language to applaud the leader for her handling of successive crises.

“Mrs Merkel is a personality who has played a defining role in European affairs in recent years. She is one of the longest-serving chancellors … For sure, she bears responsibility,” he added, alluding to the excoriating fiscal policies demanded by Berlin, blamed for eviscerating the Greek middle class.

“But there are positive things, too, that Europe has done that are to her credit. Our relationship was marked by the fact that Greece was going through a difficult time, but for Europe, and for Angela Merkel, it was a difficult time too.”

Ahead of the visit, the 64-year-old chancellor also sounded a conciliatory note acknowledging that the “past few years have been very difficult for many people in Greece”.

In remarks to the conservative daily, Kathimerini, she applauded the “great progress” the thrice-bailed-out country had made, insisting that Berlin would continue to stand by Athens as efforts continued to reform and modernise its economy. Greece exited its third EU-sponsored bailout programme in August, ending almost a decade of dependency on international aid.

“I would like to reassure Greece that in this course it can continue to count on its partnership and friendship with Germany.”

At a time when Europe is faced with new threats, including an ascendant far right and the appeal of populist demagogy, the visit is aimed as much at healing past wounds as turning a new page, officials and analysts said.

“Europe has changed. There are new challenges like Donald Trump, who is completely unpredictable and has made the need for Europe to remain united greater than ever before,” said Stelios Kouloglou, an MEP with Greece’s leftist Syriza party.

“There are times when you can feel a nostalgia for people who in the past you may have been totally against,” he told the Guardian. “In the face of extremism, with hardliners on the rise, this is one of them.”

Merkel has repeatedly warned against the perils of resurgent nationalism, describing it as the biggest threat to global security in her New Year’s Eve address. In Tsipras she had found a staunch ally in her policies towards refugees and controversial decision to take in more than a million asylum seekers at the height of the migrant crisis in 2015.

As the country on the frontline of massive migratory flows from Turkey, Greece had openly supported the EU accord reached with Ankara to limit the arrivals.

“It was a time when Merkel needed the Greek government on her side and Tsipras rose to that challenge,” said Ulrich Storck, who heads the Athens office of the Friedrich-Ebert-Stiftung political institute, which has promoted Greek-German ties. “After his first months in office when Tsipras decided to change course and implement fiscal polices he had previously opposed, he took a very pragmatic path and that has played a big role in warming relations. Perhaps on the ground there is still a lot of anger but both leaders now get on very well.”

Tsipras’s determined efforts to resolve the long-running row over Macedonia’s name, supporting a landmark accord that will see Greece’s northern neighbour being rechristened the Republic of Northern Macedonia, has also been welcomed by Merkel. Germany, like other EU members, says resolution of the dispute is crucial to shoring up the stability of the fragile western Balkans at a time of mounting Russian influence in the region.

In contrast, the leader of Greece’s main opposition party, Kyriakos Mitsotakis, a natural ally for the conservative Merkel, has strongly opposed the deal and vowed to vote against the agreement when the Greek parliament is expected to ratify it later this month.