After deals negotiated with both the United States and Russia which put an end to its offensive in Syria, Turkey has won a key demand: the removal of Kurdish fighters from along its border.
But these deals, and the US's withdrawal from the zone, are also a huge boost for Russia, which is now better placed than ever to force a resolution of the conflict in favour of its ally, Syrian President Bashar al-Assad.
- What will change on the ground? -
Turkey already controlled swathes of Syrian territory in the north of the country thanks to two previous operations to the west of the Euphrates river.
Now it is expanding its presence to the east of the river with a 120-kilometre (75-mile) long "safe zone" between the towns of Tel Abyad and Ras al-Ain, extending 30km deep into Syrian territory.
The Kurdish YPG militia have been cleared from this zone.
The accord says that joint Russian-Turkish patrols will take place up to 10km from the border in the rest of Turkey's proposed safe zone, starting on October 29.
- Who are the winners and losers? -
While Turkey is set to make short-term gains from the deals, analysts say Moscow and the Syrian regime will reap the biggest benefits.
"The Syrian army will retake control of the whole of the north-east, apart from the strip of territory between Tel Abyad and Ras al-Ain which is under Turkish occupation," says Fabrice Balanche, Syria expert at Lyon University.
"Assad is getting back a third of Syria's territory without firing a shot," he adds.
Emre Kaya from the Istanbul-based Edam think tank also thinks Assad is the "biggest winner" from the agreements.
"He has regained control of the borders, several key towns and major transport routes," says Kaya.
The Kurdish YPG are undoubtedly the biggest losers after their abandonment by the US, which withdrew the bulk of its troops from the region and left the field clear for the Russians.
Balanche says that along with the Kurds, "who have lost all their power and autonomy in this region," the US has also suffered in "losing credibility among its local and international allies".
After the US withdrawal, it now seems wholly up to Russia, Turkey and Iran to decide the next steps in solving the conflict under the aegis of the Astana peace process launched by those three countries.
- Quid pro quo? -
Turkish officials boast that they have been able to secure all of their demands in regards to the YPG without having made any concessions.
But experts suspect that in return Turkey may have agreed to turn a blind eye to a Syrian regime offensive in Idlib province, the last stronghold of anti-Assad rebels backed by Ankara, along with some jihadist groups.
On Tuesday Assad made a rare visit to the frontline in the region, just as the talks between Erdogan and Putin were getting underway in the Black Sea resort of Sochi.
"It's too soon to talk about a quid pro quo," says Kaya.
But nevertheless the timing of Assad's visit made it "an important symbol," he adds.
Kemal emphasises that the Sochi deal will "probably push Ankara towards accepting the capture of Idlib by the regime," adding that the "rebels will be less effective without Turkish support".
Turkish soldiers patrol the northern Syrian Kurdish town of Tal Abyad near the Turkish border on Wednesday