Demonstrators celebrate after burning a car they say was full of ammunition as they stormed the headquarters of the Islamist Ansar al-Sharia militia group in Benghazi September 21, 2012. Pro-government demonstrators stormed the headquarters on Friday and evicted fighters from the site in a sweep of militia bases in Benghazi.

Ever since the end of the Libyan revolution last October, the militias—both secular and Islamist–that overthrew former leader Muammar Gaddafi have acted with impunity. They stole cars and confiscated buildings. They clashed with rival brigades using heavy weaponry they pilfered from military bases. But an interim government too weak and disorganized to confront the brigades was unable to persuade them to merge them into a national army and police force. And so frustrated residents in Benghazi decided to act on their own.

As the U.S. and Libyan government scrambled to find a way to tame those very same militias allegedly behind an attack against the American consulate that left four dead including the U.S. ambassador to Libya, Benghazi residents took things into their own hands. In clashes that extended into the early morning hours, protesters overran the base of a militia suspected of masterminding the raid. The demonstrations started peacefully when 25,000 to 30,000 Benghazi residents poured into the streets shouting slogans such as “No to Terror, No to al-Qaeda” and “No to militias, no to brigades.” By nightfall, however, small groups of exasperated citizens raided militia compounds throughout the city.

Friday’s march grew out of a civil society campaign to highlight a widespread condemnation of the attack that killed American envoy Chris Stevens and three others 10 days ago. “The Friday to Save Benghazi,” was advertised on television, radio and the internet. “We want to save Benghazi from the violence and get rid of the militias,”says protest organizer Muhammad Bujan.

The demonstrators began their rally at a downtown hotel at 5 p.m. and marched several miles to al-Kish square where an Islamist militia was holding its own demonstration. Despite its denial of responsibility for the attack on the consulate, the Ansar al-Shari’a brigade had been roundly condemned as being behind the assault. About 3,000 Ansar supporters waved flags with the slogan “There is no God but Allah.” They also held up placards that read “We demand that National Conference members [Members of Parliament] and government officials renounce their American citizenship.” Some sported long beards and flowing robes favored by Islamist extremists. Others wore plaid button down shirts and jeans.

Around 9 p.m. a group of about 80 men who were furious over Stevens’ killing marched on a militia base two miles away in the neighborhood of Sidi Hussein and soon stormed the building as militia fighters fled. Emboldened, they next overran the Ukba bin Nafi’a brigade that is affiliated with Ansar al-Shari’a. “We want them to know that Libya belongs to the people and not those with guns,” said Ahmad Obaidi as he joined others ransacking the base. As the crowds grew in size and confidence, they headed towards the Ansar al-Shari’a headquarters in Efoyhat, three miles away. But when they arrived, the group’s members refused to surrender and fired a number of warning shots in the air to try to disperse the protesters who refused to flinch. After 10 minutes however, the brigade accepted defeat, making way for the demonstrators to destroy the compound with rocks and pipes.

With the fall of every militia base, police forces moved in with heavy weaponry to secure the area. As they did, Benghazi residents celebrated. “We need to get rid of these terrorist gangs,” Attiya al-Hasi remarked a few blocks away. “The country belongs to us and not to them.” By 3 a.m., government authorities responded by sending out a mass text message calling on residents “to return to your homes and not give the discredited the opportunity to corrupt your noble demonstration.”

“Today’s protests exposed the amount of stress on society,” explained Anas El Gomati, Director of Governance and Security at the Al Sadeq Institute in Tripoli, the capital of Libya. “There is a willingness to go the extra mile in Benghazi to take the first step towards disarming the militias.”

The militia and Islamist phenomenon exists in other parts of the country. But Libyans there will find it harder to replicate Benghazi’s example. The city of Misrata with its dozens of militias is a state onto itself, running several prisons and preventing foreigners from entering. The city of Zintan has equally powerful brigades and has refused to turn over Gaddafi’s son Saif al-Islam to the national government. In both towns the brigades are admired for their role in the revolution and do not suffer from the militia backlash that has become widespread in Benghazi in the wake of the consulate attack. And as long as such brigades retain their societal support, it will be a long time before the scenes in Benghazi will be repeated in other parts of Libya.