European Union foreign ministers have agreed to launch a new mission in the Mediterranean to enforce a United Nations arms embargo on Libya.

In their meeting on Monday in Brussels, the ministers attempted to find a new solution to stem the bloodshed since the current embargo is routinely flouted.

More:

"We all agreed to create a mission to block the entry of arms into Libya," Italian Foreign Minister Luigi di Maio said, adding that the mission would include a naval element to enforce the embargo - a sticking point for some member states.

"If it creates a 'pull factor', that is to say the ships attract migrants, the mission will be stopped."

The news was confirmed by his German and Austrian counterparts.

Austria had led opposition to reviving Operation Sophia - set up in 2015 to fight people smuggling across the Mediterranean - to enforce the embargo with ships, fearing it could reactivate a rescue fleet that would end up ferrying migrants across the Mediterranean to Europe.

Hungary, whose right-wing populist government has taken a tough anti-immigration stance, is understood to have supported Austria's objections.

Libya has been in turmoil since 2011, when a civil war toppled longtime leader Muammar Gaddafi, who was later killed.

There are two competing administrations in the country: the UN-recognised, Tripoli-based Government of National Accord (GNA), and a separate administration based in the eastern city of Tobruk, which supports the rebel military commander Khalifa Haftar.

The GNA is supported by Turkey, which recently sent thousands of soldiers to Libya.

Haftar, whose forces launched an offensive to capture the Libyan capital of Tripoli last April, is backed by the United Arab Emirates and Egypt.

The UN said in November that the UAE, Sudan, Turkey and Jordan have violated the arms embargo imposed on Libya.