Libyan security forces said Sunday they had deployed in Zawiya after battles between armed groups in the western city left three people dead including two civilians, according to medics.
"We have deployed on the instructions of the supreme military authorities in the zones of combat, and succeeded thanks to mediation efforts by tribal leaders and city elders to halt the fighting," General Akram Douwa told AFP.
Rival factions in Zawiya, west of the capital Tripoli, have been fighting on and off for weeks.
Local medics reported two civilians and one militiaman were killed in clashes overnight into Friday, adding that two other civilians were wounded.
More than a decade of violence in Libya since a NATO-backed uprising that toppled and killed strongman Muammar Gaddafi in 2011 has seen armed groups fighting for power and influence with impunity.
The North African country, which is awash with weapons, is split between a nominally interim government in Tripoli in the west, and another in the east backed by military strongman Khalifa Haftar.
Following one violent bout in Zawiya in April, residents who have been caught in the crossfire took to the streets to protest.