The European Union warned on Wednesday that a deal with Turkey to curb mass migration to Europe hinges on Ankara acting to support peace talks with EU member Cyprus.

European Council President Donald Tusk, who will chair an EU summit on Thursday and Friday, said much remained to be done to reach a deal with Turkey.

“Work is progressing but there is still a lot to do,” he said in a letter to EU leaders. The migration deal needed to be “an opportunity (for Turkey) to support the settlement talks in Cyprus. Only if this is possible can we move forward here.”

EU officials offered last-minute tweaks to the draft pact with Turkey in an effort to make it legally watertight, but a standoff with Cyprus could yet scupper any deal this week.

Under a tentative agreement reached last week, Ankara would take back all migrants and refugees who enter the EU from its shores or are detained in its territorial waters, in return for more money, faster visa-free travel for Turks and a speeding up of its slow-moving EU membership negotiations.

For its part, the EU would admit one legal Syrian refugee directly from Turkey for each one trying to reach Europe by boat and taken back by Turkey from the Greek islands in a step meant to wreck the business model of people smugglers.

But Cypriot President Nicos Anastasiades has threatened to veto any progress in Turkey’s accession talks unless Ankara meets its obligation to open Turkish ports and airports to Cypriot traffic, effectively recognising his state.

“We are certainly not giving Turkey a free ride,” European Commission Vice President Frans Timmermans said. Ankara would have to enact a raft of measures within six weeks if Turks were to get visa-free travel to the 26-nation Schengen area in June.

German Chancellor Angela Merkel is pushing hardest for the deal after suffering heavy losses in regional elections on Sunday due to public anger over an uncontrolled influx of more than 1 million migrants into Germany last year.

Merkel told parliament in Berlin on the eve of the Brussels summit that no one should be “deceived” by a relative lull in arrivals since Austria and Balkan countries shut their borders.

More than 43,000 migrants and refugees are bottled up in squalid conditions in Greece after Macedonia closed its border, and more are arriving daily despite NATO’s Aegean sea patrols.

“The current easing that Germany and some other member states are experiencing is one thing. The situation in Greece is the other, and it must be a big concern to us all because it is not without consequences for us all in Europe,” Merkel said.

An agreement with Turkey would need to be followed by a deal among EU countries to accept quotas of refugees, she said, something several central European states have so far rejected. (Reuters)