Armed groups claimed to have taken control of Libya's second largest city, Benghazi, after defeating units loyal to a renegade general, taking over their barracks and seizing tanks, rockets and hundreds of boxes of ammunition.

The main police headquarters was on Thursday still smouldering after it was hit by shelling a day earlier, and smoke rose from the barracks of al-Saiqa soldiers loyal to General Khalifa Haftar, once the strongest security body in the city until it was overrun earlier this week.

Live Box 201462110622169518

The armed groups' sweep through Benghazi was a heavy reversal for Haftar, who for months had led his loyalists in a self-declared campaign to stamp out "terrorists" and "extremists".

His forces now appeared to only hold the airport on the city's edges.

Those opposing him belong to a newly-formed umbrella group called Shura Council of Benghazi Revolutionaries, made up of multiple armed factions.

Among the factions is Ansar al-Sharia, the group accused by the US of leading a September 11, 2012 attack on a diplomatic facility in the city that killed the ambassador and three other Americans.

"We are the only force on the ground in Benghazi,'' a commander of one of the coalition's factions told the AP news agency on Thursday.

He said the coalition's fighters had driven all fighters loyal to Haftar out the city, and congratulated his followers on their "victory and conquest".

The Shura Council was formed after US troops abducted a top commander, Ahmed Abu-Khatala, and accused him of involvement in the attack on the US embassy.

On July 14, the coalition said it took over one of the biggest army barracks in eastern Libya, called Barracks 319. Over the past week, they took control of more than five other barracks in Benghazi, including the Saiqa camp.

Source: AP