Tripoli: Islamic State group jihadists briefly occupied the heart of a Libyan city near Tripoli but were ousted by militia fighters, in clashes that left 16 people dead, officials said today.

IS has taken advantage of growing chaos to expand its foothold in the North African country, which has rival governments vying for power.

The jihadists' overnight seizure of the security headquarters and other buildings in Sabratha came days after a US air strike hit an IS training camp near the western city, killing dozens, probably including a senior IS operative.

IS fighters exploited the "security vacuum" in the city centre as security forces loyal to authorities in militia-held Tripoli conducted raids looking for IS operatives in the suburbs, Sabratha's municipal council said in a statement.

Up to 200 IS fighters from "sleeper cells" seized the chance at around midnight Tuesday to take control of the security headquarters and other buildings, Taher al-Gharabli, the head of the city's military council, told television.

Ten members of the security forces were killed when IS attacked the security base, while six others died in clashes before and afterwards, military council spokesman Adel Benwir said.
Security forces have since regained "complete control," Benwir said.

"Some IS fighters are south of the city," he added, without giving a number.

Libya has had rival administrations since mid-2014 when the internationally recognised government fled Tripoli after the Fajr Libya militia alliance overran the capital and set up its own parliament.