A witness says Islamic State fighters have consolidated their hold over the city of Sirte in central Libya, calling on residents to pledge allegiance over loudspeakers from its main mosque and desecrating bodies of their adversaries.

Cleric Khalid Awad says Saturday that street fighting has stopped at the moment, but that the extremists hold the area around the mosque and have surrounded disputed residential areas, where resistance has ceased.

He says the extremists killed some of their prisoners and hung the bodies from bridges, roundabouts and highways across the city.

The IS affiliate spread in Sirte in March, taking advantage of the chaos plaguing Libya since 2011. It has been battling a rival Islamist group for control of the city since earlier this month.