Turkey and Russia have agreed what they called a "historic" deal over military action against Kurds in northern Syria after a marathon diplomatic meeting.
The two powers had both stationed troops on the Turkey-Syria border after US troops withdrew from the area.
Turkey launched an offensive against Syrian Kurdish militias, parts of which it considers a terrorist group.
Now, Russia and Turkey will conduct joint patrols on the border, changing the power dynamic in the area.
The new deal came just ahead of the expiry of a ceasefire between Kurdish fighters and Turkish forces which had been brokered by the United States.
Kurdish fighters said they had completed their withdrawal under that agreement, but the deal agreed by Turkey with Russia has effectively extended it.
They have been given another 150 hours to withdraw to a depth of 32km (20 miles) from the border – a so-called "safe zone".
The Kurdish forces in northern Syria are dominated by the Kurdish People's Protection Units (YPG) militia, which Turkey considers a threat lying on its border.
The deal effectively splits military control of the region between Russia and Turkey, filling a role left vacant by the United States' sudden and unexpected withdrawal.
Why is Russia involved?
After the US forces – which had been allies to the Kurds fighting the Islamic State group – withdrew, Turkey's President Recep Tayyip Erdogan launched a cross-border offensive on 9 October.
Russia, allied to Syria's president, stationed troops near the border over concerns that Syria's territory was being encroached upon by a foreign power.
The Russian deployment had created the potential for clashes between Russia and Turkey – something Mr Erdogan and Russian President Vladimir Putin both want to avoid.
But after six hours in a private meeting, Mr Erdogan and Mr Putin, the two sides agreed a deal.
Russia has agreed to allow Turkey's operation, removing the risk of conflict between the two sides.
The area in question is a 120km-long strip between the towns of Ras al-Ain to Tal Abyad, where the Turkish operation is taking place.
But Mr Erdogan had reportedly wanted all 440km of the border to be part of the safe zone.
The statement from Russia and Turkey says that Kurdish forces "will be removed" from the towns of Manbij and Tal Rifat – both of which lie outside the operation area.
Kurdish militias have yet to indicate whether they will agree to those demands.
What role does the United States have?
A US-led multinational coalition relied on the YPG to battle Islamic State (IS) militants in Syria over the past four years, but the Turkish government views it as a terrorist organisation with links to a Kurdish rebel group fighting in Turkey.
It agreed to pause the assault last week at the request of the United States.
Media playback is unsupported on your device
President Donald Trump's decision to order US troops to leave the border area was widely criticised by US lawmakers.
On Thursday, US Vice-President Mike Pence persuaded Mr Erdogan to agree to pause the Turkish offensive for 120 hours to allow the US to Read More – Source