Turkey and Russia have agreed what they say is a "historic" deal aimed at keeping Kurdish forces away from Syria's border with Turkey.
It comes during a pause in Turkey's offensive to drive Kurdish forces out, creating a "safe zone" in the area.Under the deal, Syrian and Russian forces will immediately oversee a withdrawal of Kurdish forces.
There is no word from the Kurdish fighters, whom Turkey regards as terrorists.
The deal sets out plans for joint Turkish-Russian patrols along the border next week.
The agreement was announced after six hours of talks on Tuesday between Turkish President Recep Tayyip Erdogan and his Russian host, Vladimir Putin, in the Black Sea resort of Sochi.
A ceasefire brokered by the US was set to expire on Tuesday evening and Turkey had threatened to re-launch its offensive against the Kurdish fighters. It said there was now "no need".
The Turkish offensive began after the US announced a sudden and unexpected withdrawal of its troops from northern Syria. The US troops had been supporting the Kurdish fighters, who have been allies in the fight against the Islamic State (IS) group in the region.
What was agreed in Sochi?In its offensive, Turkey seized a 120km-long strip of land between the towns of Ras al-Ain and Tal Abyad - part of its attempt to create a "safe zone" to resettle up to two million refugees currently in Turkey and remove the Kurdish fighters.
Under the deal, Russia has agreed to allow Turkish troops to remain in the area they have taken and to retain sole control.
Kurdish fighters have been given 150 hours from midday on Wednesday (09:00 GMT) to pull back 30km (18 miles) along almost the whole frontier from the Euphrates, just east of Manbij, to the Iraqi border.
Russian and Syrian forces will move in immediately to oversee the Kurdish pullback.
The area around Qamishli, which has a large Kurdish population, is not included and no immediate details were given as to what would happen there.
After the 150-hour deadline expires on 29 October, Turkish and Russian troops will begin joint patrols in areas described as "in the west and the east of the area" of the Turkish offensive.
The statement from Russia and Turkey also says Kurdish forces "will be removed" from Manbij and the town of Tal Rifat, 50km to the west of Manbij - both of which lie outside the operation area.
Kurdish militias and political leaders have made no immediate comment on whether they will agree to the demands.
Syria's President Bashar al-Assad has raised concern about foreign interference in Syria but the Kremlin said he had thanked President Putin and "expressed his full support for the results of the work as well as the readiness of the Syrian border guards, together with the Russian military police, to reach the Syrian-Turkish border".