Protests against the film "Innocence of the Muslims" have been held across the Muslim world. At least 19 people died in Pakistan on Friday alone in clashes with police trying to stop protesters attacking US diplomatic buildings. Witnesses say supporters of Ansar al-Sharia lined up outside its Benghazi headquarters, in front of the crowd, waving black and white banners.
They fired into the air to try to disperse the protesters, but fled with their weapons after the base was surrounded by waves of people shouting "no to militias". However, in a standoff outside the headquarters of the Sahaty Brigade in the city, three people were killed and at least 20 injured according to witnesses and officials.
The two sides are said to have exchanged rocket and light arms fire for two hours before the brigade decided to move out. Protesters then set fire to one of the main buildings and pillaged a weapons depot, a journalist for AFP news agency at the scene reported. Another person was killed and another 20 injured in other incidents, city hospitals said.
Senior Libyan officials say that while they welcomed the protests, people should differentiate between the rogue militias and honest rebel brigades that helped to secure the town in last year's uprising against Col Muammar Gaddafi. Earlier, some 30,000 protesters marched through Benghazi calling for an end to the armed groups and a return to the rule of law.
"I don't want to see armed men wearing Afghani-style clothes stopping me in the street to give me orders, I only want to see people in uniform," said university student Omar Mohammed, who took part in the takeover of the Ansar al-Sharia compound.
Many Libyans have expressed outrage at the attack on the US consulate. Libya's interim government has since come under renewed and intense pressure to rein in well-armed extremist militia groups and force them to disband. Friday's march was the largest seen in Benghazi - considered the heartland of Libya's uprising - since Col Gaddafi was deposed.
Armed militia groups which helped to defeat Gaddafi remain powerful in many parts of the country.
They are better armed and more numerous than Libya's official army, and there have been reports of militias intimidating and carrying out killings against rivals.
But the good news is that the people of Libya are sick and tired of the violence on both sides, and they are speaking up and taking a stand. The seeds of democracy have been planted