European Union foreign ministers agreed Monday to end Operation Sophia, the bloc's naval mission in the Mediterranean Sea, and launch a new maritime effort focused more on enforcing the U.N arms embargo around Libya.

Operation Sophia was set up in 2015 as tens of thousands of migrants headed across the sea from North Africa to Europe. Its aim was to crack down on migrant smugglers, but also to enforce the arms embargo, which is routinely being flouted.

But tensions over how to distribute migrants picked up at sea and claims that the naval presence encouraged people to leave led Italy to block the deployment of naval vessels last year. Austria, too, opposed the return of warships and the operation has been functioning for months exclusively using aircraft and pilot-less drones.

``We agreed to launch a new operation in the Mediterranean and Operation Sophia will be closed,'' EU foreign policy chief Josep Borrell told reporters after chairing the meeting of EU foreign ministers in Brussels. He said that Sophia would end on March 20 when its mandate expires.

A legal text defining the exact terms of the new mission must still be thrashed out by experts and submitted for the ministers' next meeting, in March. The idea is to shift the new operation further east, away from the usual waters used by migrants leaving Libya in search of better lives in Europe.

The new, as yet unnamed, operation will have as its aim the implementation of the arms embargo and comprise aerial, satellite and maritime assets, Borrell said. He said several countries had offered to take part, but that military commanders must yet work out how much equipment is needed.

"EU vessels will patrol again in the Mediterranean Sea... but there was a price to pay": view Euronews correspondent Darren McCaffrey's report in the video player above.

Sophia operated along the length of the Libyan coast out to sea, but Borrell said the new operation would have to move closer to Egypt. ``If we want to control the arms embargo, we have to concentrate our surveillance on the east part where the arms are coming from,'' he said.

Should commanders signal that migrants are being drawn toward the mission in hopes of being picked up, the ministers have the possibility to decide that the ``maritime assets will be withdrawn from the relevant area.'' This is meant to satisfy the objections of Austria and Italy.

Libya has been in turmoil since 2011, when a civil war toppled long-time dictator Moammar Gadhafi, who was later killed. Fighting between the country's factions has intensified over the past year.

A weak U.N.-recognized Libyan government that now holds the capital, Tripoli, and parts of the country's west is backed by Turkey, which recently sent thousands of soldiers to Libya, and to a lesser degree Qatar and Italy, as well as local militias.

On the other side is a rival government in the east that supports self-styled Gen. Khalifa Hifter, whose forces launched an offensive to capture Tripoli last April. They are backed by the United Arab Emirates, Egypt, France and Russia.

``What's important is that Sophia is history. Now comes a new mission, with a clear focus on the arms embargo,'' Austrian Foreign Minister Alexander Schallenberg told reporters after the agreement was reached.

Asked whether Operation Sophia's ships really did attract migrants, Borrell said: ``the figures show clearly during the first year of Operation Sophia the number of migrants continued to climb ... but then it went down, a lot.''

Luxembourg Foreign Minister Jean Asselborn underlined the importance of focusing on the embargo.

``If there are no weapons, there's no war. There are thousands of thousands of weapons in Libya,'' Asselborn said. ``We in Europe are the ones who will suffer if anarchy spreads in Libya.``

But taking aim at Austria – a landlocked country far from the Mediterranean but which many migrants crossed in 2015 and 2016 trying to get to Germany – for blocking the deployment of ships, he said: ``It's too much, to abandon or break with our consensus just to avoid having to save a few people.''