European Union leaders and Turkey have finalised a deal to try to halt the mass movement of migrants into Europe.
European Council President Donald Tusk tweeted there was “unanimous” agreement between Turkey and the 28 EU leaders.
Under the scheme, from midnight Sunday migrants arriving in Greece will be sent back to Turkey if their asylum claim is rejected, EU sources said.
In return, EU countries will resettle thousands of Syrian migrants living in Turkey.
For Turkey, the deal will also bring financial aid and faster EU membership talks.
But some of the initial concessions have been watered down and some EU members have expressed disquiet over Turkey’s human rights record.
British Prime Minister David Cameron has welcomed the deal, saying it could “significantly” reduce numbers of migrants crossing the eastern Mediterranean to enter Greece by boat.
But Kate Allen from rights group Amnesty International said “it’s absolutely shameful to see leaders seeking to abandon their legal obligations”.
An EU source told the BBC up to 72,000 Syrian migrants living in Turkey would be settled in the EU under the agreement.
They added that the mechanism would be abandoned if the numbers returned to Turkey exceeded that figure.
Since January 2015, a million migrants and refugees have entered the EU by boat from Turkey to Greece. More than 132,000 have arrived this year alone.
Tens of thousands are now stuck in Greece as their route north has been blocked.
Greek Interior Minister Panagiotis Kouroublis has compared conditions at the Idomeni camp, on the border with Macedonia, to a Nazi concentration camp.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.