For more than three years, Russia and Turkey have been shadow boxing on the soils of northern Syria. In the past three weeks, the stalking has turned to shooting; the Turks aiming their guns at the Moscow-allied Assad regime, and the Russians increasingly swinging their turrets towards the Turkish military.

In a war fought largely through proxies, any direct conflict between main players was considered highly dangerous and, until Thursday night, unlikely. But after the deaths of at least 30 Turkish troops – most likely the consequence of a Russian airstrike – both sides are in a standoff from which neither can afford to back down.

Refugees head towards Greece as Turkey opens borders over Syria crisis Read more

What happens from here will have wide implications for both countries, and potentially far beyond. More importantly, the next moves will define the dying stages of the Syrian war and determine the fate of up to 3 million desperate people who have been trapped between a Russian-led onslaught and a Turkish pushback.

The powerplay has led to suffering without recent parallel anywhere in the world. It has also exposed the thresholds at which Turkey – a backer of the Syrian opposition – and Russia, a resolute supporter of the Syrian leader, are prepared to operate.

After the airstrike in the town of Boulian, Turkish drones obliterated Syrian positions throughout Idlib, just as their artillery had been doing in the weeks before it. Ankara’s assessment had been that airstrikes carried out on its troops during that time were best avenged by targeting Russia’s weaker proxy, the national army.

Facebook Twitter Pinterest Columns of smoke rise after airstrikes hit the town of Saraqeb in Idlib province, Syria, on Thursday. Photograph: Ghaith Alsayed/AP

Meanwhile, Moscow was able to launch attacks without paying a direct price. The Turkish response was emboldening and revealed Ankara’s disposition towards a rival with whom it had tried to carve a stake from the ruins of northern Syria. Directly accusing Moscow would necessitate a Turkish response. Where the dominoes would fall after that could not be mapped out in advance. And nor could the politics.

Turkey, a Nato power, could conceivably invoke article 5 of the Nato pact, which would compel other member states to come to its defence. But the response that would solicit from the alliance itself, part of which could view the flare-up as an indulgent spat, rather than a sovereign threat – the benchmark for Nato involvement – could not be guaranteed. Both sides could do without the relationship being tested.

The Turkish president, Recep Tayyip Erdoğan, seems disinclined to pursue a Nato route and has instead threatened Europe with a flow of Syrian refugees being held back by a border wall along its southern frontier. Another exodus from Turkey, like the huge numbers that went to central Europe in 2015, would be politically unpalatable for European leaders and is powerful leverage for Turkey. To what end, few seem certain of.

The fog of the Syrian war has mired all its protagonists. Even as Russia and Turkey engaged deeper in Idlib, their endgames remained poorly defined. Vladimir Putin seemed determined to finish the war at all costs, using the power of his air force to compel a ceasefire and then hand over the smouldering ruins to a puppet leader whose strings are pulled by Moscow. Gas and oil interests, plus the lucre of reconstruction, would follow. After four years of blood and treasure, Russia would also secure a prominent foothold in the Middle East, a bulwark to Iran and the US, with a sea route, in the heartland of the region. Quite the prize. And a very different outcome to Washington’s disastrous war in Iraq.

Turkey’s interests in Syria have been less clear. An overarching embrace of the Syrian opposition from 2012 to 2016, which ended with the fall of Aleppo, has been replaced with more narrow national interests in mind. Keeping Kurds from the border zone west of the Euphrates became the paramount concern, alongside strategic reach far into northern Syria and securing the region’s main highway. But how that would take shape could only be agreed after the shooting stopped.

With neither side ready to face up directly, a durable ceasefire may well be in the offing. But not before Turkey has squared the debt through Russia’s proxy. With Russia controlling the airspace over Idlib province, Turkish drones and artillery are likely to be deployed to full devastating effect in coming days, but not at Russian troops, or air bases.

As long as that remains the case, Russia will retain a whip hand over the embers of Idlib, bombing its foes into submission while reactivating political processes aimed at consolidating its eventual control. Moscow will eventually want to stand down, but Turkey needs to sooner. Directing its wrath against Europe and Bashar al-Assad instead of the country responsible for one of the biggest casualty counts in the state’s modern history proves that.

The beleaguered people of Idlib will be watching.