ALTHOUGH he was not there, it was hard to escape Donald Trump at the European Union’s latest summit. Held in Malta on February 3rd, the day-long event focused on new plans for handling migration, particularly for stemming the flow of people making their way towards Europe from sub-Saharan Africa through Libya and across the Mediterranean. It also touched upon broader (and slightly wonky) questions of what the EU means 60 years on from the Rome treaty. But it was Mr Trump who dominated proceedings. François Hollande, the French president, called his American counterpart’s comments earlier this month denigrating the EU “unacceptable”. Describing the new migration plans, Federica Mogherini, the union’s foreign policy chief, said “we do not believe in bans and walls”, a slap at Mr Trump’s executive order on refugees and his plans for a wall on America’s Mexican border. Yet the EU’s new plans could be just as chaotic and ineffective as Mr Trump’s.

After the EU struck a deal with Turkey in March 2016 to crack down on people-smuggling in the Aegean sea, the flow of migrants from Turkey to Greece dropped dramatically, from 57,000 in February 2016 to about 3,400 in August. But the numbers making their way from Libya have not decreased. Some 180,000 arrived in Italy last year, with more than 4,000 dead or missing on the crossing. Many of them are economic migrants, not refugees. The largest proportion came from Nigeria, which has very low asylum acceptance rates. Most experienced extreme hardship on the route: reports of beatings, rapes and torture in Libya are common.

The EU is now attempting to implement a version of the EU-Turkey deal in Libya in order to stem the tide. A day before the summit Paolo Gentiloni, the Italian prime minister, signed a deal with Fayez al-Sarraj, the prime minister of the Government of National Accord (GNA), the UN-backed Libyan government. Italy will provide money to try to persuade the GNA to stop smugglers sending thousands of people out on flimsy boats. The EU backed the deal at the summit, providing an additional €200m ($216m) to an EU fund for Africa (already worth €1.8bn), and confirming plans to train up the Libyan coast guard. Transit countries, such as Niger and Mali, have also been targeted with promises of cash and international help (particularly from Germany).

The point, said Angela Merkel, the German chancellor, was not to keep out genuine refugees: “This is not about who has the right to claim asylum.” Rather, she said, it was about destroying the smugglers’ business model. Along with preventing people from attempting the Mediterranean journey, Europe will need to try to make their home countries safer, or to establish safe havens in nearby countries. European leaders seem to hope that migrants can be persuaded to stay put. Mrs Merkel said that on a trip to Niger last year she spoke with former migrants who had travelled to Libya, faced horrendous conditions there, and been persuaded by the International Organisation for Migration (IOM) to return to their home countries.

Yet Mrs Merkel acknowledged that at the moment the GNA does not have the “necessary stability” to implement such policies. This is an understatement. Libya today is close to lawless: the GNA has limited control outside of Tripoli, the capital, while the coast is ruled by competing militias. The EU is mulling getting neighbouring countries, such as Tunisia or Egypt, involved, but the plans are vague. Training up Libyan coastguards, a good idea in theory, may prove ineffective; they may belong to militias. Last year one group of Libyan coastguards boarded an NGO-run search-and-rescue boat. Other NGOs have accused coastguards of beating migrants with sticks.

The plan might not just fail to prevent emigration; it could also make life more miserable for thousands of migrants. The Italy-Libya deal calls for establishing “reception centres”, but does not explain what they would be, says Federico Soda of the IOM. Detention centres, run by different militias and other groups, already exist all over Libya. Most provide miserable accommodation to those who are stuck in them, almost always against their will. For the plan to work these centres would have to offer more humane conditions. The EU will also need to make a concerted effort at state-building in Libya, Niger and other countries along the route, with enough money and regular monitoring, says Elizabeth Collett of the Migration Policy Institute, a think-tank—something for which Western countries no longer have much appetite.

If the situation now seems dire, that is partly because it has been left to fester for too long. The Italian government has been complaining to the EU about the failure to tackle African migration for decades. Indeed, the EU’s plan to bottle up migrants in Libya is reminiscent of the deal Silvio Berlusconi cut with Muammar Qaddafi, the former Libyan dictator, to do the same. But it was not until the catastrophic overflow of migration from Turkey to Greece in 2015 that policies for the central Mediterranean route began to be implemented. Mrs Merkel acknowledged this at the summit; at a lunch, she said, EU leaders had discussed why “sometimes we are far too slow”.

Such deliberation over migration policy is preferable to the angry rashness Mr Trump has shown in his first weeks in office. But in the face of a humanitarian disaster such as the Mediterranean refugee crisis, hesitation can be as dangerous as haste.