Hundreds of Libyan protesters have stormed the eastern city of Benghazi and evicted the Islamic militia from their stronghold.
As the protesters working with the military police took over the bases of the extremist groups, four people were killed and up to two dozen injured. Some of the protesters were shot in the leg by the militia.
Reports from the region suggest the militant groups did not go down without fighting. Gunfire was heard before they were flushed out of Benghazi. A vehicle and buildings were also set on fire during the confrontation.
The militant groups stopped firing soon after the Libyan troops arrived.
The protesters stormed the headquarters of the militant group Ansar al-Sharia, the one which is thought to have attacked the US consulate a few days back.
Initially, the group showed resistance to the protesters firing in the air. They fled their headquarters once they were outnumbered by the protesters who shouted slogans such as "no to militias".
The orchestrated eviction of the militia seems to have been a planned operation by government forces and activists.
"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," a university student involved in the eviction, Omar Mohammed, told the Associated Press.
The protesters thronged Benghazi a day after tens of thousands of protesters demanded putting a full stop to the armed militia.
While officials in the Libyan capital Tripoli have appealed for peace, they urged the protesters to differentiate between armed militant groups and rebel brigades.
"After what happened at the American consulate, the people of Benghazi had enough of the extremists. 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," a protester Hassan Ahmed told Reuters.
Armed militant groups have a powerful presence in many parts of Libya after the expulsion of former dictator Colonel Muammar Gaddafi.