BRUSSELS European Union leaders agreed to offer Turkey financial and political concessions if it stops migrants reaching Greece and will meet the Turkish prime minister in Brussels on Friday to try and clinch the deal.
Even if they can overcome possible objections from Ahmet Davutoglu, however, Thursday's EU summit revealed considerable doubts among the Europeans themselves over whether the deal can be made either legal in international law, or workable.
After talks over dinner, leaders gave negotiators a mandate to conclude an accord with Turkey by which it would take back all migrants who reach Greek islands off its coast; in return the EU would take in Syrian refugees direct from Turkey, give aid for Syrians there, speed Ankara's EU membership negotiations and a scheme to let Turks visit Europe without visas.
German Chancellor Angela Merkel, who first devised the plan with Davutoglu and sprang it on surprised peers at a special summit 10 days ago, said a deal would not be easy but that all the European leaders wanted an agreement to slow the arrivals.
Much of the debate on Thursday, she said, focused on ensuring that a plan which has outraged human rights agencies could ensure that those returned to Turkey, a country with a patchy and worsening rights record, would have asylum rights protected.
Summit chairman Donald Tusk would lead a negotiating team to meet Davutoglu on Friday morning to prepare a lunch involving all 28 EU national leaders with the Turkish premier.
"An agreement with Turkey cannot be a blank cheque," Belgian Prime Minister Charles Michel warned, echoing many colleagues who face complaints that Europe is selling out to anti-immigrant nationalists at home by outsourcing its problems to the Turks.
A major problem is Turkey's four-decade-old dispute with EU member Cyprus, whose President Nicos Anastasiades insisted there could be no agreement to speed up Turkey's EU membership talks until Ankara stops barring Cyprus from its sea and airports - itself a result of a refusal to recognise the Cypriot state.
Following the EU meetings, where various leaders highlighted to Tusk where they could give ground and where they had "red lines", Anastasiades he was ready to veto a deal if he had to.
There is anger in Nicosia at Merkel for appearing to make Davutoglu an offer without consulting Cyprus - especially at a time when talks on reuniting with the Turkish-backed north of the island are at a delicately hopeful stage. And Tusk, a former Polish premier, made clear Cypriot interests must be respected.
Nonetheless, after a year in which more than a million people have arrived in Europe fleeing war and poverty in the Middle East and beyond, EU countries are looking desperately to Turkey to seal its coastline and stem the flow.
But Lithuanian President Dalia Grybauskaite said the package was "very much on the edge of international law" and, even if agreed, appeared over-complicated and hard to implement.
One senior EU official said that a lack of legal clarity in Turkey on the status of refugees from countries other than Syria - notably large numbers of Iraqis and Afghans - was emerging as a serious sticking point to Greece sending such people back.
Prime Minister Alexis Tsipras, facing a build-up of more than 40,000 refugees stranded in Greece by recent border closures in the Balkans, said his economically struggling country needed more help to care for migrants.
EU officials said Greece also needed time to set up legal and administrative structures to carry out the deportations.
Davutoglu said as he left Ankara for Brussels that EU states were struggling to agree among themselves but that he would not take a deal to "turn Turkey into an open prison for migrants".
A draft agreement among EU envoys watered down two important inducements to Turkey and included new safeguards intended to overcome legal objections to sending back migrants.
Ankara's central objective - visa-free travel for Turks to Europe by June - will depend on Turkey meeting a raft of long-standing EU criteria. That need to meet all 72 conditions was stressed by French President Francois Hollande, whose voters are alarmed by the idea of 75 million Muslim Turks free to travel.
The draft, seen by Reuters, says the aim is "to break the business model of the (people) smugglers" and to offer migrants an alternative to putting their lives at risk. It stresses the return is "a temporary and extraordinary measure which is necessary to end the human suffering and restore public order".
Setting a start date for the scheme is tricky. Some want all those arriving on Greek beaches from Monday to be held for deportation, but Athens fears it needs weeks to prepare. Yet such delay may trigger a rush to cross before Europe shuts down.
(Additional reporting by Orhan Coskun in Ankara, Michele Kambas in Athens and Gabriela Baczynska, Renee Maltezou, Robin Emmott, Robert-Jan Bartunek, Philip Blenkinsop and Paul Taylor in Brussels; Writing by Alastair Macdonald and Paul Taylor; Editing by Mark Heinrich and Jan Strupczewski)
This story has not been edited by Firstpost staff and is generated by auto-feed.