BRUSSELS (Reuters) - Europe’s emerging migration policy is looking increasingly like Donald Trump without the hair.

A migrant shouts slogans as he is blocking the railway track at the Greek-Macedonian border, near the village of Idomenii, Greece March 12, 2016. REUTERS/Stoyan Nenov

Except that, unlike the Republican presidential frontrunner, who wants to make Mexico pay for a wall to keep migrants out of the United States, the Europeans are willing to pay their neighbor Turkey to do the job for them.

Seven months and a million migrants after Chancellor Angela Merkel declared a “welcome culture” for Syrian refugees in Germany, the European Union is rushing to erect “No vacancy” signs along its internal and external borders.

Under fierce political pressure in her own conservative camp and from an insurgent right-wing populist party, the Alliance for Germany (AfD), Merkel’s mantra of “We can do this” is morphing into “The Turks can do this for us”.

In a surprise overnight deal she negotiated with Turkish Prime Minister Ahmet Davutoglu last week, Ankara offered to take back all migrants, including Syrian refugees, who cross from its shores into Europe from now on or are intercepted off its coast.

Having thus sealed its most porous border to irregular migrants, the EU would admit a limited number of carefully vetted Syrian refugees directly from Turkey - one for each Syrian asylum seeker Ankara took back from Greek Aegean islands.

The lucky few would be chosen with the help of the U.N. refugee agency from among those who had waited patiently in camps in Syria’s neighbors, not those who had paid smugglers thousands of euros for a risky sea crossing. They would be sent to those EU countries that agreed last year to take in a quota, although some states are resisting that.

Stifling doubts about the legality of such a blanket return policy, discomfort at outsourcing it to a partner many of them see as worryingly authoritarian, and irritation at the price Turkey is demanding, stunned EU leaders gave their provisional assent.

DESPERATION

European public opinion is so petrified by images of tens of thousands of bedraggled migrants trekking across muddy fields and highways towards western and northern Europe - and populists have made such capital out of those fears - that governments are desperate to halt the flow.

Another summit in Brussels this week is due to conclude the Faustian bargain, granting Turkey 6 billion euros ($6.7 billion)in aid to keep refugees on its soil, an accelerated path to visa-free travel for Turks and faster EU membership talks in return for its agreement to act as Europe’s gatekeeper.

European Council President Donald Tusk says regaining control of Europe’s external borders is a condition for gaining public acceptance to take in refugees. In practice, it looks more like a way of keeping them out, if it can be implemented.

Human rights groups and volunteers who work with refugees are outraged to see Europe slamming shut its open door for victims of war and persecution.

EU lawyers are working overtime to try to make it legal. The Geneva Convention on refugees requires signatories to examine individually each claim for protection submitted by an asylum seeker on their soil.

The German-Turkish deal would get around that provision by declaring Turkey a “safe” third country to which irregular migrants could be returned under a bilateral Greek-Turkish readmission agreement.

The United Nations’ top human rights official has said that could entail illegal “collective and arbitrary expulsions”.

Apart from the moral issues raised by this dodge, there are several legal problems. Turkey restricts its application of the Geneva Convention to refugees from Europe. People fleeing war or persecution in the Middle East and Asia will not be covered unless Ankara amends its laws.

Turkish officials say they will ensure Turkey complies with international law to fulfill its part of the potential EU deal.

Even so, lawyers say asylum seekers who reach Greece have a right to appeal against being sent back to Turkey if they fear for their personal safety there. A Greek court would have to hear each appeal before a person could be removed.

There is no appropriate court on the Greek islands, and Greek justice is notoriously slow.

EMBARRASSMENT

At the same time, the rush to declare Turkey “safe” could hardly have come at a more embarrassing time for the EU.

President Tayyip Erdogan has stepped up a military crackdown on Kurdish militants, the government has seized Turkey’s best-selling newspaper, critical journalists face prosecution and jail, and businessmen and public officials close to a dissident Muslim cleric have been purged.

Unlike Trump, most EU leaders do not declare they want to prevent more Muslims settling in their country, with the exception of Hungary’s Viktor Orban and Slovakia’s Robert Fico, who have stressed preserving their countries’ Christian identity.

However, anti-immigration campaigners like Marine Le Pen in France and Geert Wilders in the Netherlands openly cite Islam as a reason for rejecting refugees, and they are increasingly setting the agenda for mainstream politicians. They oppose visa-free travel for Turks in Europe for the same reason.

France, which has a tradition of political asylum and took in tens of thousands of Vietnamese “boat people” in the 1970s, is limiting its intake of Syrian refugees now, citing security concerns following last year’s Islamist attacks in Paris.

Like other west European countries, France has struggled to integrate second and third generation young people of Muslim or north African origin. The place of Islam in public life is fiercely contested in these secular societies, and resentments from Algeria’s war of independence still simmer.

European politicians may be aghast at the rhetoric of Trump, who has said he wants a database to register and track Muslims in the United States and would bar any Muslim entering the country until Congress could act.

But if the pact with Turkey goes through as conceived, the EU will be retreating into a “fortress Europe” policy for fear of its own Trumps.

($1 = 0.8968 euros)