BBC News - Libya: Islamist militia bases stormed in Benghazi
At least four people have been killed in the Libyan city of Benghazi after military police and protesters took over militia bases.
The violence followed a day of protests by tens of thousands of citizens demanding an end to the armed groups.
The bases include the HQ of the Islamist group Ansar al-Sharia, suspected of involvement in an attack on the US consulate in the city.
The attack was triggered by an amateur video made in the US which mocks Islam.
Protests against the film 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.
US citizens have been urged not to travel to Pakistan and the US embassy has paid for adverts on Pakistani TV showing President Barack Obama and Secretary of State Hillary Clinton condemning the film.
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".
Buildings and a car were set alight and fighters evicted.
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.
The BBC's Rana Jawad in the capital Tripoli says the Sahaty Brigade is believed to be operating under the authority of the ministry of defence.
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.
There has been a wave of hostility towards the militias since US Ambassador Christopher Stevens and three others Americans died in last week's attack on the Benghazi consulate.
"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.