European Union foreign ministers have agreed to end the bloc’s naval mission in the Mediterranean Sea.
Operation Sophia was set up in 2015 as tens of thousands of migrants headed across the sea from north Africa to Europe.
The Royal Navy worked with other EU nations during the mission to crack down on migrant smugglers and also to enforce a UN arms embargo around Libya, which is routinely being flouted.
Four British vessels have been part of Sophia since 2015: HMS Diamond, HMS Echo, HMS Enterprise and HMS Richmond.
"We agreed to launch a new operation in the Mediterranean and Operation Sophia will be closed," EU foreign policy chief Josep Borrell told reporters in Brussels.
Mr Borrell said that Operation Sophia would end on 20 March, when its mandate expires.
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 in 2019.
Austria also opposed the return of warships and the operation has been functioning for months exclusively using aircraft and pilot-less drones.
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.
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.
"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.
The new operation will aim to implement the arms embargo and comprise aerial, satellite and maritime assets.
Mr Borrell said several countries had offered to take part, but that military commanders must work out how much equipment is needed.
Operation Sophia operated along the length of the Libyan coast out to sea, but Mr 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 towards 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 Muammar Gaddafi, who was later killed.
Fighting between the country’s factions has intensified over the past year.
A weak UN-recognised Libyan government that now holds 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 General Khalifa Hifter, whose forces launched an offensive to capture Tripoli last April.
They are backed by the United Arab Emirates, Egypt, France and Russia.