Turkish President Recep Tayyip Erdogan (R) and German Chancellor Angela Merkel (L) arrive for a joint press conference in Istanbul on October 16, 2021. AFP
Merkel and Erdogan developed complex but close relations over the German chancellor's 16-year term that navigated the perils of Turkey's tumultuous ties with the West.
Their personal bond was instrumental in helping Europe manage a refugee crisis in 2016 and calm simmering tensions in the east Mediterranean last year.
Merkel also helped iron out some of the difficulties that have crept into Erdogan's relations with Washington and French President Emmanuel Macron.
The two leaders had lunch and private talks in a presidential villa overlooking the Bosphorus on the latest leg of Merkel's parting foreign tour.
"I have always said that our collaboration was very good in the years that I worked with Mr Erdogan," Merkel told reporters after the talks.
"I criticised Turkey on the issue of human rights and individual freedoms. We looked for solutions. We could have differences, but we depended on each other," she said.
The 67-year-old German leader said her "advice" to Turkey today was to expect "the same thing for the coming government in Germany.
"The relationship between Turkey and Germany, with its negative and positive sides, will go on. It will be recognised by the next government," she said.
Erdogan referred to Merkel as his "dear friend" twice during the closing media event.
But he also hinted at the difficulties Turkey might have in promoting its interests after Merkel formally gives way to a new coalition government taking shape in Berlin following elections last month.
"If there had been no coalition government, (Germany's) relations with Turkey might have been easier. Of course, it is not easy to work with a coalition government," Erdogan said.
Erdogan headed Turkey as prime minister when Merkel became the first woman to head Germany in 2005.
The two have since shared a long list of differences and numerous testy exchanges on issues ranging from Turkey's crackdown on human rights to its military campaigns in Syria and Libya.
But Germany also played a central role in defusing a crisis in the east Mediterranean last year that erupted when Turkey began searching for natural gas in disputed waters claimed by Cyprus and Greece.
Analysts say Merkel was more sympathetic to Erdogan's position because of the presence of an estimated three million ethnic Turks in Germany.
She has also been sensitive to Erdogan's threats to let an estimated five million migrants and refugees temporarily living in Turkey under a 2016 deal with the EU to leave for Europe unless Ankara's interests are respected by Brussels.
"Their relations were very difficult in many respects but they managed to establish and maintain working cooperation," analyst Gunter Seufert of the German Institute for Security and International Affairs told AFP.
Seufert predicted that the new German government will be more "sceptical" about extending the terms of the Turkey-EU agreement on migrants or continuing arms sales to Ankara -- particularly submarines.
"With the new chancellor, no matter who they will be... it will be more difficult to coordinate the European policy with Turkey to the level and degree Angela Merkel did."