Less than nine months after Turkey’s downing of a Russian fighter jet put the nations’ combative presidents at loggerheads, shared interests and anger at the West have spurred an unlikely rapprochement.
Russia's president Vladimir Putin said last year it was "practically impossible for us to reach agreement with Turkey's current leadership", after an act that suggested Ankara had "decided to lick the Americans in a certain place".
His Turkish counterpart, Recep Tayyip Erdogan, insisted that the pilot who shot down the Russian bomber was only doing his duty and that "those who violated our airspace are the ones who need to apologise".
Yet in June, he did write to the Kremlin to express regret over the incident and to call for the "restoration of traditional friendly ties" between Russia and Turkey. Shortly afterwards, he received an invitation to Putin's home town.
Whatever the mood music in St Petersburg, however, there was hardly genuine warmth between two men who bristle at any affront to their authority and who feed on and fuel a constant suspicion of real and perceived enemies.
Putin sees the greatest danger coming from western powers that he believes want to encircle Russia with Nato bases and troops, and enfeeble it by imposing economic sanctions and funding his political opponents.
Fury at EU and US
For Erdogan, anger at last month’s attempted coup in Turkey was compounded by fury at what he sees as the failure of the EU and US to give him the backing he deserves.
“The whole world reacted to the attack against Charlie Hebdo. Our prime minister joined a rally in the streets of Paris,” Erdogan said this week, referring to the 2015 militant attack on the office of the French satirical magazine.
“I would have hoped that the leaders of the western world would have reacted [to the coup attempt] in the same way and not have contented themselves with a few cliches.”
Erdogan and allies have also lambasted the US for refusing to immediately extradite Fethullah Gülen, the Pennsylvania-based Muslim cleric whom Ankara accuses of being behind the coup attempt. Lawyers for Gülen (75) say Turkey has not offered any evidence to support its allegations.
“If the US does not deliver [Gülen] they will sacrifice relations with Turkey for the sake of a terrorist,” said Turkey’s justice minister Bekir Bozdag. “It is in the hands of the US to stop Turkish anti-US feeling becoming hate.”
Such comments are music to many ears in the Kremlin, as it seeks to weaken alliances and strategic partnerships – especially the EU and Nato – which it considers to be anti-Russian.
Plenty of strategists in Washington and Brussels welcomed the rift between Turkey and Russia, seeing it as a chance to put more pressure on Moscow’s interests in the Middle East and the Black Sea, but now the balance is shifting again.
Just as Putin is sick of being chided for his authoritarian rule, now Erdogan is furious with the EU and US for criticising his sweeping purge of alleged Gülen supporters and for threatening to reinstate the death penalty in Turkey.
While much of the West wrung its hands after the coup, Putin was quick to call Erdogan to express support for his rule – and there are similarities in how the two “strongmen” leaders seek to crush critical voices in politics and the media.
Lifting sanctions
Russia is now lifting trade and tourism sanctions imposed last year that damaged the Turkish economy, and wants to push ahead with projects for a gas pipeline and a nuclear power station in Turkey that were halted when relations froze.
Analysts say Turkey has reduced arms supplies in recent weeks to Syrian rebels who are fighting government forces backed by Russia.
Erdogan will not give up his opposition to Syrian leader Bashar al-Assad, but he may be open to discussion with Putin of a transition that removes the current regime while aiming to protect Russian and Turkish interests in the strategic country.
With Iran, Saudi Arabia and other states also seeking to shape Syria's future, such a plan is hard to envisage, but there is no doubt that Russia and Turkey are keen to show that they can work together, even to the possible detriment of EU and US interests.
"Russia is a major, key and very important player in establishing peace in Syria, " Erdogan said before arriving in St Petersburg.
“I think the problem must be solved through joint steps by Russia and Turkey.”