Freelance Writer, Political Analyst\Editor, Middle East, Iraq

As Turkey mend ties with Russia, what now for the changing dynamics in the region?

With a strong geopolitical standing, Turkey has historically been a keen lever between the East and West. After increasingly lukewarm relations with its NATO allies in the West in recent years and a bitter feud with the biggest Eastern power in Russia, Turkey could not sit idle as its regional leverage was diluted and new events at home unfolded.

The mending of ties between Moscow and Ankara comes almost 9 months since the fatal downing of a Russian jet that propelled relations to historic lows. Now the tune of Turkish President Recep Tayyip Erdoğan and his Russian counterpart Vladimir Putin could not be more different.

The patching of ties has a number of angles but is certainly fuelled by the recent failed military coup in Turkey. Turkey was already at loggerheads with the US over support of Syrian Kurdish rebels whom Turkey accuses of been terrorists but who have proved by far the most effective group against the Islamic State (IS) and then there is the continuous friction with the EU over a migrant deal that even today is not fully implemented.

The failed coup rocked Erdogan, the AKP and Turkey leading to severe crackdown of opponents in various circles that has been criticized by the US and EU, not to mention the possibility of reintroducing the death penalty which would all but end any lingering hope of EU membership.

Erdogan has been heavily critical of US refusal to hand over exiled cleric Fethullah Gulen whom he accused of orchestrating the coup with thinly veiled threats that Washington would soon need to choose between Gulen and Turkey.

For the US and EU, Ankara remains a key ally but they have also grown frustrated in recent years as Ankara has driven a hard bargain over the migrant crisis, access to Turkish airbases and the lack of direct action against IS.

By papering over ties with Russia, there is obvious economic benefit as Russian sanctions took their toll on Turkey. However, Turkey is clearly showing their Western and NATO allies that Turkish foreign policy is dynamic enough to deal with the changing sociopolitical picture in the region. Turkey is demonstrating that they are not short of options and that the West is more in need of Turkey than any carrot of EU membership or ties with its western allies.

The thinly veiled threat from the Turkish Foreign Minister that they could leave NATO owed to lack of US and EU support in the aftermath of the coup reinforces this point.

Russia, of course, gets numerous benefits of its own with a Turkey that is disappointed with their allies and turns to their shoulder. It boosts Russian quest to play a stronger strategic role in the Middle East and at the same time as diluting Western influence.

However, at the same time, months of animosity will not just evaporate overnight. Not without tough compromises from each side. For example, Ankara can stomach most Syrian realities, even if it includes Assad, if it somehow curtails the increasing strategic and powerful Syrian Kurdish forces who enjoy a great deal of autonomy.

But it remains to be seen if Russian would drop their support of Syrian Kurdish forces or on the other hand if Turkey could drop its strong support of Syrian opposition.

Either way, a Turkey that is leaning increasingly towards the East, transforms an already complicated Middle Eastern picture. The extent of any new reality depends on US action on Gulen, whether EU will continue to appease Turkey to shore up the migrant deal and whether Russian and Turkey can bridge their differences over Assad and the Kurds.