They have opposing views on Israel's war with Hamas and conflicting attitudes to Moscow since the invasion of Ukraine, but when Germany and Turkey's leaders meet in Berlin on Friday they have powerful economic and electoral incentives to talk.
Tayyip Erdogan's first visit to Germany since 2020 comes ahead of municipal elections at which he hopes to win back the cities of Ankara and Istanbul. The prospect of better access to the European Union market and visa liberalisation would be a big gift to voters buffeted by high inflation and economic crisis.
Erdogan will also need Chancellor Olaf Scholz's blessing if he is to buy the 40 Eurofighter Typhoon warplanes Turkey said on Thursday it wanted. Germany, via Airbus, is a partner in the consortium that builds them.
For Scholz, heading a fractious three-way coalition that is rowing over the German economy and the impact of rising immigration on public services, Ankara's role in stemming migration to the EU makes it an indispensable partner.
In a sign of the visit's importance, Scholz took pains not to respond directly to Erdogan's loud condemnation of Israel's war against Hamas, in which many thousands of Palestinians have been killed.
On Wednesday, after Erdogan called Hamas, which murdered some 1,200 in its Oct. 7 attacks on Israel, a "liberation organisation", Scholz declined multiple invitations to criticise Erdogan, noting only in general terms that "the charges being brought against Israel are absurd".
The response was decidedly mild given the fierce condemnation that far more muted criticisms of Israel typically draw in Germany, traditionally one of Israel's closest allies.
But Erdogan doubled down on Wednesday, labelling Israel a "terror state" with "unlimited support" from the West, suggesting that it may be impossible to contain all the Gaza fall-out during his trip.
Germany has expressed strong solidarity with Israel, while urging a focus on limiting the impact of the war on Gaza's civilians.
Initial planning for the visit started in the summer, "but that the Gaza conflict would break out was not expected," said Aydin Yasar, a Turkey specialist at German thinktank SWP.
The visit also comes a day after the Turkish parliament's foreign affairs commission delayed a vote on Sweden's NATO membership bid, putting off enlarging the Western alliance after an 18-month wait in which Ankara demanded terror-related concessions from Stockholm.
MISSING THE MATCH
The EU's 2016 deal under which it paid Turkey to host refugees in return for a managed resettlement programme did much to stem record flows to the bloc, but recriminations between Greece and Turkey have put it under strain, and rising numbers of migrants are fuelling the far-right across Europe.
Erdogan, who recently described Germany to reporters as "Europe's most powerful country" may hope to win Scholz's backing to revive stalled talks on modernising Turkey's customs union with the EU - although major changes will not come until long after elections in March.
Despite both sides' efforts, Gaza has already had an impact: Erdogan was originally slated to stay another day, which would have allowed him and Scholz to take in Saturday's soccer friendly between the two countries.
With some three million people with Turkish roots in Germany such encounters are always fraught, but now the risk was judged too great.
"There was a fear that there'd be anti-Israel chants," said Yasar. "It's unlikely Scholz would want to watch it with him. At other times it would have been a nice gesture."
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)