Clashes between Libyan armed groups broke out on Friday night in the city of Zawiya, some 40 kilometres west of the capital Tripoli, a security official told AFP.

An official at the city's security directorate told AFP the clashes were ongoing but "intermittent" on Saturday.

"The southern areas of the city of Zawiya have been witnessing clashes between armed groups since last night," the official said.

Libya is still struggling to recover from years of war and chaos after the 2011 overthrow of longtime dictator Moamer Kadhafi.

On Saturday morning, schools in Zawiya were suspended as some roads leading to the city were shut down amid a "casual" exchange of fire between the groups, the official said.

Media reports said the fighting left casualties, but authorities in Tripoli have yet to confirm any.

The Tripoli-based health ministry said in a statement it was working to evacuate parts of the city and taking injured people to hospitals.

The Libyan Red Crescent said it had evacuated some families from areas affected by the fights.

Authorities have not disclosed the reasons behind the fight.

Videos shared since Friday night on social media, which AFP could not verify, showed armed men in SUVs firing heavily at other armed groups.

Other videos showed smoke rising from parts of the city.

Although relative calm has returned to the oil-rich country in the past few years, clashes periodically occur between its myriad armed groups.

Last month, clashes broke out in the capital Tripoli, sparking panic among locals who 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.