Greece is to start returning migrants arriving by boat from Turkey from the beginning of next week, after a deal between the EU and Ankara was finalised in Brussels.
The agreement marks a radical shift of tactics after a year in which more than a million people entered the EU by making the short sea crossing from Turkey to the Greek islands.
Under the terms of the new settlement, the EU will take in one Syrian refugee from camps in Turkey for each irregular migrant returned, in a move which is intended to break the business model of people-smugglers who have made fortunes by providing spaces in boats to desperate refugees.
After intensive negotiations at a two-day summit in Brussels, European Council president Donald Tusk announced that the deal had received "unanimous agreement" from all 28 EU leaders and Turkish prime minister Ahmet Davutoglu.
Any migrant arriving in Greece after midnight on the evening of March 20 will be given a swift individual interview to determine whether they will be allowed to remain or sent back to Turkey. The arrangement will impose a heavy logistical burden on the Greek authorities, and the UK has offered to send more border officials to support the processing of thousands of migrants.
Turkey won EU agreement to accelerate visa liberalisation for its 75 million nationals, who could gain visa-free access to the Schengen borderless area - which does not include the UK - as well as the reopening of long-stalled negotiations on its application to join the EU.
Turkish concerns about the slow delivery of three billion euro (£2.3bn) promised by the EU last November were addressed by including a commitment to identify within the coming week a list of projects which will receive funding. A further three billion euro are being made available after the initial tranche of support runs out.
Mr Tusk's spokesman said that the agreement made clear that any removals would have to be "in full compliance with international and EU law" and that there would be no "collective expulsions".
But the deal was described as "a dark day for humanity" by human rights group Amnesty International, whose UK director Kate Allen said: "It's absolutely shameful to see leaders seeking to abandon their legal obligations. Forcing refugees back into the hands of the very smugglers they just came from so they can have another go at exploiting them is obviously a madness. There's no way anyone should herald this as a solution."