BRUSSELS — The European Union still has nightmares about the mismanaged chaos of the 2015 influx of migrants and refugees, which produced horrible pictures of dead children, masses of unregistered people wandering the roads, political divisions and a significant boost to far-right populism across the Continent.
Turkey’s vow to let hundreds of thousands more leave for Europe has done more than revive those fears. It has exposed Europe’s failure to use the time bought since 2016, when it made a deal to pay Turkey to house migrants and refugees, to create a coherent migration or asylum policy.
So Europe once again finds itself in a quandary, trying to tread a line between two NATO members, Turkey and Greece, one trying to push refugees forward, the other trying to keep them out.
There is little doubt that Europe, beyond Greece, wants neither the migrants nor another crisis. European Union leaders made that clear enough this week, when they traveled to Greece to display solidarity with sometimes harsh Greek efforts by a new center-right government to keep any new migrants or refugees away.
“Our first priority is making sure that order is maintained at Greece’s external border, which is also Europe’s border,’’ said Ursula von der Leyen, the European Commission president.
For the European Union, it is an awkward moral clash with its professed values of protecting human rights, individual dignity and the right to seek asylum under international law, which Greece says it has suspended for now.
But it is also a deeply political problem, given the way populists from Viktor Orban in Hungary to Matteo Salvini in Italy and the Alternative for Germany party have profited from the chaos of 2015 and the influx of more than a million people, mostly Muslim. The populists have vowed loudly to defend European and national borders, and identity.
Then there is the problem of President Recep Tayyip Erdogan of Turkey, who has created many of his own difficulties, but who has also, mostly alone, taken on problems the Europeans have chosen to ignore.
The signs have been building for some time that the Syrian regime of Bashar al-Assad, with Russian and Iranian military support, was bound to move to crush the last redoubt of revolution in Idlib Province, which borders Turkey.
“It shows that Europe’s complete holiday from geopolitics always ends up being very costly,’’ said Mark Leonard, director of the European Council on Foreign Relations. “Europe again is in full spectator mode, incredibly passive through the whole Idlib crisis, which was predictable and predicted.’’
But Mr. Erdogan’s manipulations to try to wrench help from the Europeans have done much to alienate his potential allies.
He has tried to leverage relations with Russia against Europe and the United States, even as he has confronted Russian troops and proxies in both Syria and Libya.
He also pleaded for help defending Idlib, to prevent another million refugees pouring into Turkey, while at the same time weaponizing the migrants and refugees he currently houses against Europe.
None of this has made Mr. Erdogan friends.
Still, Turkey is a key member of NATO. Its forces are preventing what could be a massacre in Idlib. And it is also defending the United Nations-backed government of Libya.
So the dilemma for Europe and NATO is complicated: simultaneously to support Mr. Erdogan, try to pull him back into line against Moscow, and resist what Europeans consider his migration blackmail.
“Erdogan wants to protect the last opposition stronghold in Idlib and wants to avoid another wave of refugees,’’ said Amanda Sloat, a former State Department official dealing with Turkey who is now at the Brookings Institution.
“He’s rightly frustrated that the bulk of the Syrian refugee crisis has fallen on him to manage,’’ Ms. Sloat said. ‘‘But it’s problematic for him to try to blackmail the E.U. to help him by opening the gates, even as at the same time the E.U. and the international community are not stepping up to the problem.’’
Mr. Erdogan’s Turkey is hosting some four million migrants and refugees, and argues that Brussels is not keeping its promises under the 2016 deal, which set out 6 billion euros in aid for Turkey — though not directly to the government — and promised efforts to resettle legitimate refugees inside Europe.
Brussels argues that it has kept the essence of the deal, so far signing contracts for 4.7 billion euros and disbursing 3.2 billion euros. But Europe has resettled fewer than 27,000 Syrians from Turkey in four years.
European Union officials are quietly talking to Turkey about providing further help, but there is no sign that European nations will provide the military support Mr. Erdogan wants to create a “safe zone” in Idlib and a no-fly zone there.
The bloc’s foreign policy chief, Josep Borrell Fontelles, announced 60 million euros’ worth of aid for the most vulnerable people in northwest Syria after talks on Wednesday in Ankara with Mr. Erdogan. Senior E.U. officials had announced a much larger sum, 700 million euros, in new aid to Athens to help it tackle the migrant crisis.
European officials point out that the border between Idlib and Turkey is tightly shut and that so far there is no new influx of Syrian refugees.
So did Asli Aydintasbas, a Turkish analyst with the European Council on Foreign Relations in Istanbul. She also noted that there are few Syrians among the thousands of asylum seekers Mr. Erdogan has encouraged to try to get into Greece.
“These are not people from Idlib, and many are not from Syria,’’ she said. “They are mostly Afghans, Iraqis and Iranians — the Syrians in Turkey are pretty settled there and have not moved back to areas near Syria.’’
Ms. Aydintasbas said Mr. Erdogan was trying to secure more funds for his government, which faces mounting economic difficulties. But Turkey also wants to get European and NATO attention on Idlib, contain the Kurds, and shift a dangerous domestic debate about the costs of Turkey’s war inside Syria to the refugee crisis, she said.
She noted that after the deaths of at least 36 Turkish soldiers in Syria last week, the Turkish government shut down Twitter for a day, trying to mute criticism.
Mr. Erdogan’s gamble with Russia appears to be failing, too, Ms. Aydintasbas said.
The government annoyed NATO and European allies, she said, by buying the Russian S-400 antiaircraft system “with much fanfare, with much talk from the government of Turkish independence.’’
“But now,” she said, “when push comes to shove, Turkey needs Western support.”
The footsie with Moscow has done little to stop Russia and Syria’s brutal advance in Idlib. “These are huge blunders that even the man and woman on the street can see,’’ Ms. Aydintasbas said.
Robin Niblett, the director of Chatham House, a research institution in London, said the use of non-Syrian refugees to try to pressure the Europeans “just feeds into all the cynicism about Turkey.’’
“This broader flow of economic migrants just reminds everyone in Europe that you need to fix it,’’ he said.
But Mr. Niblett also criticized the Europeans for their “active absence from the Syrian conflict, the lack of strategic thinking and involvement.’’
He said there seemed to be a quiet European hope that Russia and Mr. Assad would simply finish the job in Syria, no matter how ugly it might get, given that Idlib is also the last refuge for a sizable contingent of Al Qaeda as well as other Islamist opponents to Mr. Assad.
The same may hold for Libya, where France, for example, supports the strongman Khalifa Hifter along with Russia, while Turkey supports the weak U.N.-backed government.
In a sense, Mr. Niblett said, there is the beginning of a more realist European foreign policy, which will continue to pay off Mr. Erdogan to avoid a new wave of refugees.
“But of course you cannot build a formal foreign policy like that and get any support from European parliaments, because it goes against all Europe stands for in its values,’’ Mr. Niblett said.