Sabratha - A security force loyal to Libya's internationally recognised government announced on Friday that it has driven a rival militia out of the city of Sabratha, after three weeks of deadly fighting.
The clashes between a security force loyal to the UN-backed Government of National Accord (GNA) and the militia of the head of a former people smuggling network, Ahmad Dabbashi, have killed 39 people and wounded 300 since September 17.
Sabratha has been "liberated and... the destructive militias have been defeated", the leader of the pro-GNA force, General Omar Abdeljalil, said in a video posted on Facebook.
The GNA, which had originally set up the security force to fight the Islamic State group during its brief occupation of central Sabratha in February 2016, welcomed the announcement.
It expressed "great satisfaction with the positive developments at Sabratha", in a statement posted on Facebook.
Both the GNA and the security force urged the people of Sabratha to refrain from carrying out revenge attacks.
"Those who have complaints must resort to justice and refrain from harming the lives and property of the defeated," said General Abdeljalil.
The violence began with an exchange of gunfire at a checkpoint manned by the security force in which a militiaman was killed.
Libya has plunged into insecurity and political chaos since the ouster and killing of its long-time leader Moammar Gaddafi in a NATO-backed 2011 revolution.
People smugglers have fed on the turmoil, turning violence-wracked Libya into a key gateway for illegal migration to Europe.
Sabratha, 40km west of Tripoli where the GNA is based, is Libya's main departure point for migrants trying to reach Europe.
Dabbashi is reportedly among several people smugglers who have decided to halt their lucrative business and cooperate with authorities.