After six hours of talks with Vladimir Putin, a somber 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 clamoring 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 favorable 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."
BRIEF RESPITE?
The region around Idlib and parts of neighboring provinces formed one of four rebel-held areas which Russia, Iran and Turkey designated "de-escalation zones" three years ago in an effort to stem the bloodshed.
The agreements were short-lived, however. Since then, Syrian forces and their Russian and Iranian allies have retaken the other three "de-escalation zones" from the rebels and Assad has vowed to regain all of Idlib too.
The latest accord risks being as short-lived as other ceasefire deals in Syria, analysts in Turkey and Russia said.
"The agreement between Turkey and Russia is not a final one, it's a temporary ceasefire," Unluhisarcikli said. "Clashes may start again in the coming days."
Fifteen people were killed in fighting between jihadist insurgents and Syrian government forces in southern Idlib just hours after the ceasefire came into effect, a war monitor said, but elsewhere in the province residents said violence subsided.
Sinan Ulgen, visiting scholar at Carnegie Europe and a former Turkish diplomat, said Erdogan had to make concessions to Putin because the alternative - a return to military conflict - would be "a lose-lose scenario for Turkey."
Russia's air control over Idlib, although challenged by Ankara when it carried out waves of drone assaults on Syrian forces and shot down three Syrian warplanes, would have left Turkish troops exposed to lethal firepower.
At least 34 Turkish soldiers were killed in an air strike in Idlib last week, the deadliest attack suffered by the Turkish military in nearly three decades.
"Turkey sat at the negotiating table with this military vulnerability," Ulgen told Reuters. "Achieving a ceasefire was important from that aspect, but this ceasefire had a cost."
Turkey's other vulnerability in Idlib are the dozen military observation posts originally set up to monitor the 2017 "de-escalation" agreements. Most of those were surrounded by Syrian troops in recent months, and remain isolated from some 20,000 troops Erdogan has deployed into Idlib in the last month.
Thursday's brief, three-point declaration did not spell out the fate or future role of the observation posts, but Erdogan said they were important and would remain. "All of these will retain their current status. There is no change at the moment."
It was not clear, however, what role those posts could play, deep inside areas controlled by Assad's forces. "With this agreement, that region was given to the (Assad) regime, so those observation posts have no meaning," Ulgen said.
Despite the concessions, analysts say Erdogan is likely to be able to sell his deal domestically because it addresses the main concerns of Turkish voters - stopping a flow of migrants towards its borders and preventing attacks on its troops."If we look at it from a citizen's perspective, those were the two things that were important," Unluhisarcikli said. "Why would a Turkish citizen care about the internal borders and limits in Syria? That is not their job."