Libya is still struggling to recover from years of unrest after Muammar Gaddafi's death in 2011. / Photo: AP

Mediators in Libya have managed to end clashes between armed groups that rocked the city of Zawiya west of the capital Tripoli for 24 hours, a city official told AFP.

The gun battles, which left one dead and several wounded, broke out on Friday night and led the local UN mission on Saturday to call for "an immediate end to the hostilities."

The violence in Zawiya, 40 kilometres (25 miles) west of Tripoli, ended "thanks to mediation by the town's notables and tribal elders," the official who requested anonymity said.

Libya is still struggling to recover from years of unrest after the 2011 NATO-backed uprising that overthrew longtime ruler Muammar Gaddafi.

Relative calm

Although relative calm has returned to the oil-rich North African country in recent years, clashes still periodically break out between its myriad armed groups.

The Zawiya official said the armed groups agreed to withdraw from areas that had seen firefights and cede their control to a "neutral security and military authority."

The official did not specify who the authority was, or what had sparked the outbreak of violence.

On Saturday morning, school classes in Zawiya had been suspended as some roads leading to the city were shut amid the gun battles, the official said.

Protection and safety of civilians

The UN Support Mission in Libya called for "an immediate end to the hostilities" on Saturday night, demanding that authorities "ensure the protection and safety of civilians."

UNSMIL said the fighting had left "some casualties including civilians".

Last month, battles broke out in Tripoli, sparking panic among locals as they were celebrating the end of the Muslim fasting month of Ramadan.

In August 2023, Tripoli's worst armed clashes in a year left 55 people dead when two powerful groups fought.

Libya is divided between the UN-recognised Tripoli-based government and a rival administration in the country's east.

Click here to follow our WhatsApp channel for more stories.

AFP