As Turkey's relations with Europe and the United States are strained by the fallout from its failed coup, President Tayyip Erdogan travels to Russia on Tuesday to meet Vladimir Putin in a trip he may hope will give the West pause for thought.
Turkish officials insist Erdogan's visit to St. Petersburg is no sign that the NATO member and European Union membership candidate is turning its back on the West. Rather, they say, it is the next step in a rapprochement with Russia that started weeks before the July 15 attempted putsch.
But the thaw with Moscow, which imposed trade sanctions nine months ago after Turkey downed a Russian fighter jet near the Syrian border, comes as Ankara's relationship with the West could scarcely be more fractious.
Erdogan and many Turks have been incensed by what they see as Western concern over a post-coup crackdown but indifference to the bloody events themselves, in which more than 230 people were killed as rogue soldiers bombed parliament and seized bridges with tanks and helicopters.
The Turkish government has blamed the coup on followers of a cleric in self-imposed exile in the United States, and purged tens of thousands of his suspected followers from positions as teachers, police, judges and soldiers. Western countries say the purge has been too fast and indiscriminate.
So damaged are relations that Germany's foreign minister said this week there was no basis for discussions and that "we are talking with each other like emissaries from two different planets." Austria's chancellor suggested talks on Turkish membership of the EU should be suspended.
"For Erdogan, this meeting with Putin is certainly an opportunity to signal to Turkey’s partners in the West that it could have other strategic options," said Sinan Ulgen, a former Turkish diplomat and analyst at the Carnegie Europe think tank.
"There is this perception game that Turkey could strategically gravitate toward Russia if the relationship with the West cannot be maintained. There is also an incentive on the side of Russia to use the crisis between Turkey and the West to undermine NATO’s cohesiveness," Ulgen said.
Erdogan's meeting with Putin will be only his second with a foreign head of state since the coup, following a visit to Ankara by the Kazakh president on Friday. Turkish officials have questioned why no Western leader has come to show solidarity.
"Both Russia and Turkey are outcasts as far as the West is concerned," said Andrey Kortunov, director general of the Russian International Affairs Council, a foreign policy think tank close to the Russian Foreign Ministry.
"On the face of it, the failed coup has pulled Turkey closer to Russia. But there still remain serious differences between the two countries," he told Reuters.
Disagreements persist over Syria, where Moscow backs President Bashar al-Assad but Ankara wants him ousted, as well as the South Caucasus, where Turkey has backed Azerbaijan in a conflict with Armenia, a Russian ally, over the breakaway Nagorno-Karabakh region.
"The meeting between Putin and Erdogan ... will show how far both sides are willing to compromise. The question is whether the current tactical de-escalation can translate into a deeper strategic partnership," Kortunov said.
Signal to the west
Washington is likely to be watching closely. Its ties with Ankara are strained over the continued presence in the United States of Turkish cleric Fethullah Gulen, accused by Erdogan of orchestrating the attempted coup.
Gulen, who has lived in self-imposed exile in Pennsylvania since 1999, denies involvement in the coup and Washington has said it will extradite him only if Turkey provides evidence, much to the Turkish government's frustration.
U.S. Secretary of State John Kerry is expected to visit Turkey in late August, officials have said, with Gulen's case likely to be high on the agenda.
"At a time like this, Turkish public psychology expects expressions of solidarity and togetherness, but that's not what is forthcoming from the West," said Faruk Logoglu, a former Turkish ambassador to Washington and until recently a senior lawmaker in the main secularist opposition.
While the timing of Erdogan's Russia trip could be interpreted as a signal to the West, Logoglu doubted it meant a full Turkish embrace of Russia or lasting damage to U.S. ties.
"The Turkish-American relationship is like a catholic marriage: there is no divorce. Both sides need each other," he said. "It has experienced severe tests in the past and I think it will weather this one as well."
Closer ties between Ankara and Moscow could be more troublesome for Europe, which sees a plan for a gas pipeline from Russia to Turkey, a project known as TurkStream, as a complication in its efforts to cut dependence on Russian energy.
"Gas cooperation between Russia and Turkey could be scary for the European Union," said Akin Unver, assistant professor of international relations at Kadir Has university in Istanbul and an expert in regional energy.
"The EU wants to diversify suppliers and link eastern Mediterranean gas to Europe in the long run ... if Russia bypasses all that with TurkStream that would not help. But the EU is in no position to bargain. Politically, it is very weak."
Putin's foreign policy aide Yuri Ushakov said Syria would be the main topic at the meeting with Erdogan. TurkStream, nuclear power projects, and the resumption of Russian charter flights to Turkey, which stopped after the downing of the fighter jet last November, would also be discussed.
Tourism revenue, a mainstay of the Turkish economy, has been decimated by the drop in Russian visitors, whose numbers fell 87 percent in the first six months of the year. The sector has also been hit by a series of suicide bombings.
"The Turkish side has given a written guarantee that they will fulfill Russia’s recommendations on extra security measures for Russian tourists at Turkish resorts," Ushakov told a briefing in Moscow on Friday, adding that Turkey had granted Russian experts permission to check the measures on the ground.
On Syria, Kortunov said there was room for the two sides to move closer together on options for a political transition to end the five-year civil war and on the shape of a new constitution for the country.
"In cooperation with Russia, we would like to facilitate a political transition in Syria as soon as possible," Erdogan's spokesman Ibrahim Kalin said in an interview with Russia's TASS news agency. But he repeated Turkey's long-held conviction that such a move would only be possible with Assad's departure.
Kalin described the recent tensions with Russia as "short-lived turbulence" in a friendship that dated back centuries. Leaders in the West might be hoping the same is true of their relations with Ankara.
"The political backdrop does suggest there will be areas of convergence between Turkey and Russia," said Ulgen, the former diplomat. "What is not realistic, though, is to view Russia as a strategic alternative to Turkey's Western anchoring. Turkey remains an ally of the West."