During talks in Malta, the interior ministers of France, Germany, Italy, Malta and Finland decided to share among their five countries migrants trying to cross from Libya – the deadliest migration route to Europe – who are rescued at sea.

The deal to determine which countries will accept rescued migrants hopes to end the long, drawn-out negotiations that have seen vulnerable asylum seekers – including babies – stranded at sea, sometimes for weeks.

The deal will apply for the coming two weeks, until an October 8 meeting of European Union interior ministers, when participants in Monday’s talks hope all or many more fellow EU countries will join the arrangement.

Italian Interior Minister Luciana Lamorgese said the exact percentages of rescued migrants each country would agree to take will ultimately depend on how many EU members eventually participate in the system.

Current EU rules say refugees and other asylum-seekers must stay in the country where they arrive while their cases are processed, but most migrants hope to reach northern Europe to find jobs or rejoin family members who have successfully emigrated there.

For more than a year, migrant rescue ships were blocked by Italy and Malta from docking or disembarking their passengers to those countries.

Italy’s new, pro-EU government has moved quickly to turn the page on the hardline anti-migrant policies pursued by former interior minister Matteo Salvini and ease the tension between Rome and Brussels.

A successful European migrant agreement would be a blow to Salvini, showing that cooperation gets better results than confrontation.

In a sign of how things have changed over the last few weeks, late on Sunday Italy authorised rescue ship the Ocean Viking to disembark its 182 people rescued at sea in Messina, Sicily.

The decision “puts an end to five days of unnecessary suffering”, said charities SOS Mediterranee and Doctors without Borders (MSF) which operate the ship.