The European Union will launch a new Mediterranean naval and air mission in April to stop more arms reach warring factions in Libya, EU diplomats said on Thursday, with Greece agreeing to take in any migrants rescued at sea.

The decision, which was delayed by divisions over migrants, followed warnings by EU foreign affairs chief Josep Borrell that the bloc risked becoming irrelevant if it could not act, potentially leaving Libya’s fate to Turkey and Russia.

“Greece has allowed disembarkation (of rescued migrants) in its ports,” said an EU diplomat involved in the negotiations, adding that other EU governments agreed to help cover the harbor costs of bringing those rescued on shore to avoid more financial pressure on Athens.

The new mission, named Irini, will replace the EU’s current military mission, known as Operation Sophia, which stopped deploying ships a year ago after Italy, facing an anti-immigrant backlash, said it would no longer take migrants rescued at sea.

With hundreds of thousands making the perilous crossing from North Africa each year and thousands dying at sea, EU ships are required under international law to rescue those in trouble.

Sophia’s mandate expires at the end of March, meaning Irini aims to start patrolling the eastern Mediterranean, where most arms smuggling takes place, from April. However, diplomats acknowledged the EU is unable to patrol the Egypt-Libya land border, through which artillery is still being delivered.