Russia and Turkey recently concluded talks in Astana about Syria. It was a remarkable cooperation given that Turkey shot down a Russian fighter jet just over a year ago, damaging relations between the two countries.
What tactics has Russia used to manage such delicate relationships and become the main architect of the future of Syria? If we look at the past and present, we can see a successful pattern of Russian manoeuvring.
In July 2015, the commander of Iran's elite Quds force, Qassem Soleimani, visited Moscow, after which Russia entered the Syrian war. Russia then moved towards working with the Obama administration as co-partners in developing ceasefires, an International Support Group for Syria, and a United Nations-led Geneva process. The cooperation with the US did not work; however, Russia achieved its goal of appearing an equal to the US globally.
The US entered that game without a policy on Syria, nor any weight on the ground. Former US Secretary of State John Kerry's words and techniques were no match for the Russian investment of hardware, and he effectively played into Russia's process.
The US has since been unceremoniously dumped by Russia in regards to Syria. Once Russia's goal of global parity was achieved, the Americans were no longer necessary. Russia invited the Trump administration to Astana (Iran rejected the American presence), but it was clearly a Russian defined process.
Russia used the UN deftly as well. The UN, and its envoy Staffan de Mistura, provided international legitimacy, and more cover for the Russian process, although the envoy initially garnered his credibility from being backed by Russian-American co-sponsorship.
But, once the UN process was no longer needed - and Mistura was a little too critical of Bashar al-Assad's excesses - Russia declared that he was not fulfilling his mandate, creating an excuse to sideline him. Having played the UN game, Russia could afford to shed it.
A 'political solution'
Today, Russia wants to first achieve a ceasefire, or, as some say, a "frozen conflict" in Syria, and Turkey is the key to getting armed opposition groups to agree. This is the logic that justifies the cooperation between the two today.
However, after a ceasefire, the next step will be a "political solution" to the conflict. The key to that file is Iran, not Turkey. It is the Islamic Republic that is closest to Assad and his security system, and with the highest stakes in his fate.
Will Turkey, like the US and the UN before it, then get knocked out of the game after Russia achieves its aims of a ceasefire. Will it be left behind as Vladimir Putin clambers up the ladder of control in Syria?
Some will say that Putin is clever enough to keep Turkey in the political game, needing it as a counterweight to Iran, and having it manage the opposition. Russia will also have probably made political promises to Turkey to seal today's cooperation deal.
Turkey may not be knocked out, but its role may be geographically circumscribed to certain parts of northern Syria. The question is, can Russia square the circle of its promises to Turkey while also dealing with Iran?
It is far from certain whether Russian wiles can outdo Persian cunning for the future of Syria.
Iran is not fully happy with the Russian-Turkish approach today, as it wants a clearer and firmer victory for Assad, but it is smart enough to bide its time. It is the power on the ground and also the key for any serious future politics.
Iran and Assad needed Russia's air force for military victory, but political and security control on the ground is their game. Lest we forget, President Assad has his own ideas about his future and that of Syria, probably closer to Iran's than Russia's. The successful Russian manoeuvres meet their match with the partner that had "invited" it to the conflict in July 2015.
Russia will have tough decisions ahead: Will it be an exit from Syria, leaving an incoherent mess, a managed frozen conflict, or real change? If Russia opts for any significant political change, the situation may end up a tough and dirty tactical tug of war between Iran and Russia for years to come, each pressuring the other to bend to its will.
The wild card
However, the Middle East is never that simple. There is still a wild card left. Israel has deftly stayed out of the Syrian war until now, and has developed quiet understandings with Russia so the two don't get in each other's way militarily.
If Israel increases its pressure on Assad and Hezbollah - and thereby Iran - in southern Syria, that would constitute an indirect message: don't get too confident about "victory". Donald Trump's more anti-Iranian stance will abet this direction. The Obama holiday is ending for Tehran.
It is far from certain whether Russian wiles can outdo Persian cunning for the future of Syria. What is clear however is that, through Syria, Russia has achieved the perception of global parity, if not supremacy, with the US, woven itself into international legitimacy through the UN, and deflated and co-opted a rival, Turkey.
In the stratospheric realm of geopolitics - and fighter jets - Russia has run circles around everyone. However, "the ground" is controlled by fighting forces and security systems created and nurtured by Iran. There, the visitor to Moscow in July 2015 and his country may have the final say.
John Bell is director of the Middle East programme at the Toledo International Centre for Peace in Madrid. He is a former UN and Canadian diplomat, and served as political adviser to the personal representative of the UN secretary-general for southern Lebanon and adviser to the Canadian government.
The views expressed in this article are the author's own and do not necessarily reflect Al Jazeera's editorial policy.