Days before he flew to Moscow to strike a ceasefire deal with Russia to halt fighting in Syria's Idlib, Turkish President Tayyip Erdogan warned Syrian government forces to pull back or they would not have a "head left on their shoulders", Reuters reports.
After six hours of talks with Vladimir Putin, a sombre Erdogan announced an accord which cements territorial gains by Russian-backed Syrian forces over Turkish-backed rebels.
Returning from Russia, Erdogan said his deal with Putin will lay the ground for stability in Idlib and protect civilians who could otherwise become refugees in Turkey, after months of fighting that has displaced nearly a million people.
"The ceasefire brings about important gains," he said.
The agreement, if it holds, does stem the advances of forces loyal to President Bashar al-Assad, easing Ankara's greatest fear – an influx of Syrians fleeing bombardment in Idlib and clamouring to cross its border and join 3.6 million Syrian refugees already in Turkey.
But by freezing the front lines, and agreeing joint Russian-Turkish patrols on a major east-west highway running through Idlib, the deal consolidates Assad's recent battlefield victories and allows Russia to deploy deeper into Idlib than before.
"The Syrian army was stopped, but not repelled. That is perhaps Turkey's biggest loss," said Ozgur Unluhisarcikli of the German Marshall Fund.
Assad's progress in weeks of fierce combat includes taking full control of the other main highway running through Idlib, the north-south road linking the capital Damascus to Aleppo and other important Syrian cities.
In Moscow, Thursday's deal was widely seen as a triumph for Putin and Assad at Erdogan's expense.
"The agreement is unexpectedly more favourable to Russia and Damascus…," said former pro-Putin lawmaker Sergei Markov. "Russia is winning on the battlefield and that's why it's winning on the diplomatic front."