A spokesman for Ansar al-Sharia, which some US and Libya officials blame for the attack on the US consulate in Benghazi last week in which the US ambassador and three other Americans were killed, said it had evacuated its bases "to preserve security in the city".
- Video: Libyans retrieve US envoy’s body
- US: Too soon to call Libya attack ‘act of terror’
Libya says 50 arrested in US consulate attack
In a dramatic sign of Libya's fragility, after sweeping through Ansar's bases the crowd went on to attack a pro-government militia, believing them to be Islamists, triggering an armed response in which at least 11 people were killed and more than 60 wounded.
The invasion of Ansar al-Sharia's compounds, which met little resistance, appeared to be part of a sweep of militia bases by police, troops and activists following a large demonstration against militia units in Benghazi on Friday.
Libyan's demand 'Justice for Stevens' (Photo: AP)
Demonstrators pulled down militia flags and set a vehicle on fire inside what was once the base of Gaddafi's security forces.
Hundreds of men waving swords and even a meat cleaver chanted "Libya, Libya", "No more al Qaeda!" and "The blood we shed for freedom shall not go in vain!"
"After what happened at the American consulate, the people of Benghazi had enough of the extremists," demonstrator Hassan Ahmed said. "They did not give allegiance to the army. So the people broke in and they fled.
"This place is like the Bastille. This is where Gaddafi controlled Libya from, and then Ansar al-Sharia took it over. This is a turning point for the people of Benghazi."
Libya's government had promised Washington it would find the perpetrators of what appeared to be a well planned attack on the US consulate, which coincided with protests against an anti-Islam video and the anniversary of the 9/11 attacks.
Reliant on militants
Libya's new rulers know that, while militias pose the biggest threat to their authority, the state's weak security forces rely on former rebel units, armed with heavy weapons, that fought in the uprising.
Like the rest of Libya, Benghazi is still prowled by dozens of armed groups operating openly, usually with the official permission of a government that is powerless to stop them.
Ansar al-Sharia's overt Benghazi presence was never huge. But it was one of the few groups operating openly without official licence.
Protesters celebrate after raiding militia camp (Photo: AFP)
The attack on the US consulate seems to have provided a strong impetus for local authorities to rally support behind the weak national government.
Thousands of Libyans marched in Friday's "Rescue Benghazi Day" in support of democracy and against Islamist militias.
"It's obvious that this protest is against the militias. All of them should join the army or security forces as individuals, not as groups," student Ahmed Sanallah said. "Without that, there will be no prosperity and no success for the new Libya."
US Ambassador Christopher Stevens was well liked, and many Libyans condemned the attack on the consulate despite being angered by the anti-Islamic US-made film that triggered it.
Some protesters' placards read: "We demand justice for Stevens" and "Libya lost a friend". Others had mixed views.
- Receive Ynetnews updates
directly to your desktop