Throughout Syria’s grinding six-year war, Turkey did all it could to topple President Bashar al-Assad, backing anti-regime rebels in concert with Washington’s policy.

For just as long, Russia did all it could to preserve Mr. Assad’s rule. It finally turned the tide in the regime's favor by stepping up military support and airstrikes in September 2015, and, alongside Iran and Hezbollah, ensuring that pro-Assad forces took full control of key rebel strongholds in Aleppo last month.

Yet today, Turkey, a NATO ally, and a resurgent Russia are embarking on a new rapprochement that could be a defining feature of 2017 geopolitics, as anti-Americanism flares in Turkey and President Recep Tayyip Erdoğan finds grounds for friendship with his Russian counterpart, Vladimir Putin.

Russia and Turkey are now joint guarantors of a nationwide Syria cease-fire that notably excludes the US and United Nations. Along with Iran, they are slated to host peace talks later this month in Kazakhstan, in a bid to cement those gains for Assad.

These swift repositionings, at face value, could risk detaching Turkey from the Western alliance, where it has been the longstanding eastern anchor of NATO. Erdoğan’s West-leaning orientation earlier provided him with a moderately warm welcome in the Western club, and President Obama called Turkey a “model partner” in 2009.

But his moves at home to crack down on opponents and centralize his power have soured his image in the US. Erdoğan, for his part, has decried US failure to extradite the Pennsylvania-based cleric Fethullah Gülen, whom Turkey accuses of masterminding a mid-July coup attempt, as well as the US backing of Syrian Kurds, whom Turkey views as terrorists, in the fight against the Islamic State.

“The extent to which the US is being vilified across the board [in Turkey], on a whole range of issues, obviously sets the stage for cooperation with the Russians,” says Bulent Aliriza, director of the Turkey Project at the Center for Strategic and International Studies (CSIS) in Washington.

“From the macro-geopolitical point of view, this is obviously a victory for Russia,” says Mr. Aliriza, noting the “very clear” significance of a US and NATO ally cooperating so closely with Russia. “Within the region, it is also a victory for Russia because Turkey changed its policy almost 180 degrees in Syria.”

Still, analysts say, there are limits to Russia’s new friendship with Turkey, especially if the Trump Administration moves to assuage Erdogan’s concerns by pushing to extradite Mr. Gülen, or abandons US support for Syrian Kurds. Both ideas have been voiced by the president-elect or his top advisers, and a more forgiving White House could change Erdoğan’s tone.

Another factor will be how much President-elect Donald Trump embraces the Russian worldview in Syria – where Russia has turned itself into a decisive player in barely more than a year – and elsewhere.

“They are winning at the moment, but the question is, do they get the big prize of detaching Turkey away from the Western alliance? I think it is too early to say,” says Aliriza. “Clearly Turkey still wants to cooperate with the US. They are waiting for Trump.”

Shooting down a plane

The low point in Russia-Turkey relations came in November 2015, when Turkey shot down a Russian jet fighter that strayed for 17 seconds into its airspace. At the time, former Prime Minister Ahmet Davutoğlu said he gave the order to fire himself. Putin called it “a stab in the back by the accomplices of terrorists,” forbade Russian tourists from traveling, and slapped sanctions on Turkey.

But Erdoğan apologized for the shoot-down last summer – reversing a previous vow never to do so – as pressure grew from empty tourist resorts, and Turkey felt the need for friends. As the rapprochement deepened, Putin was the first to call Erdoğan after the July coup attempt, and has been supportive ever since.

Erdoğan’s potential lean toward the east is coming as Turkey is beset by challenges. The July coup attempt left some 270 people dead. It also spurred a three-month state of emergency to purge suspected Gülenists that has netted many government opponents, too, and was extended a second time this week.

The Syrian war, meanwhile, has yielded 2.8 million registered refugees in Turkey and the presence of IS cells in the country. And the Turkish state has renewed its fight against its own Kurdish militants, leveling parts of towns in the southeast. A surge of violent attacks on civilians and security forces – both from IS and Kurdish militants – has decimated Turkey’s tourism industry and pounded the once vibrant economy.

Yet the turmoil has only further strained relations with the US. Ruling party politicians, and especially pro-government media, have accused the US of sending CIA teams to topple the government and of supporting the violence to undermine the Turkish “success story.” Even the slaughter this week of 39 New Year’s Eve revelers at Istanbul's exclusive Reina nightclub, by a lone gunman in an attack claimed by IS, has been cast by some in print as a CIA operation.

The US role in Syria has been a key stumbling block.

“The US is a very important ally for us. We have cooperation in every field. But there is the reality of a confidence crisis in the relationship at the moment,” said Turkish Foreign Minister Mevlut Çavuşoğlu on Jan. 4. He said Turkey’s İncirlik airbase was used by the US-led anti-IS coalition, but the US had not provided air support to Turkey’s own cross-border Operation Euphrates Shield.

American support for Syrian Kurds also meant “the US chose a terrorist organization over its ally,” said Mr. Çavuşoğlu. And Gulen’s presence in the US remains a sore point.

“The terrorist leader freely threatens Turkey, gives instructions, and sends messages from [the US],” said Çavuşoğlu. “Unfortunately, we have not seen any support from the [Obama] administration about this. They tell us to give positive messages about anti-Americanism in Turkey, but I don’t know what to say.”

A measure of the interest both Russia and Turkey see in close ties now was clear after the assassination of Russian Ambassador Andrey Karlov in Ankara on Dec. 19, by an off-duty Turkish policeman who shouted “Don’t forget Aleppo!” Undeterred, foreign ministers from both sides and Iran announced a Syria peace process, and Russia and Turkey brokered the nationwide cease-fire for Syria on Dec. 28.

Upend decades of ties?

Close observers of Turkey say the pro-Russia moves signify that Moscow is seeking influence in Turkey, but that Turkey is not likely to upend decades in the Western camp.

“Erdoğan needs NATO because without it, his relationship with Putin would quickly become one of subservience,” writes Henri Barkey, director of the Middle East Program at the Wilson Center, in The American Interest. “NATO allows him to get as close as he wants to Putin, secure in the knowledge that he has a rock-hard insurance policy.”

Pro-government media have portrayed Turkey’s moves with Russia as a clever blend of strategy and tactics that have made the US nervous. Ruling party lawmakers have also enthused about the dramatic change.

Analysts say that Turkey-US relations are going through their worst period since the end of the cold war, including Turkey’s 2003 refusal to allow US invasion forces to enter Iraq from its soil. But there is a long history of US-Turkey ties, and of Russia-Turkey enmity.

“The US-Turkish relationship had its roots in Stalin’s push against Turkey after the Second World War, and Turkey entered into NATO because of that,” notes Aliriza of CSIS. “The US wanted Turkey in NATO for that reason. Once the cold war was over, question marks arose as to what the relationship should be and both sides found a way to cooperate, but with new rationales.”

Get the Monitor Stories you care about delivered to your inbox. By signing up, you agree to our Privacy Policy

Those rationales may now be shifting – to a degree.

“Obviously Russia is probing for advantages with Turkey…. This is Putin’s policy, to weaken the Western front against it,” says Aliriza. “Until we see which way the Turkish-US relationship is going to go under Trump, we have to put a caveat on how far the Turkish-Russian rapprochement could go.”