At least 27 people have been killed and 235 wounded after gunmen opened fire Friday on protesters who had called on armed groups to leave Tripoli. The latest violence further challenges Libya's weak central government.
"The demonstration was peaceful and had been permitted by the Interior Ministry, and then the protesters were fired on when they entered the Gharghur district," where the militia's headquarters are located, Prime Minister Ali Zeidan said in a TV interview Friday.
"The existence of weapons outside the army and police is dangerous," Zeidan added. "All armed militias need to leave Tripoli, without exception."
The third outbreak of street fighting within 10 days underscored Libya's struggle to contain regional militias that helped overthrow leader Muammar Gaddafi two years ago but kept their guns. Armed disorder has blocked most oil exports for months.
Friday's bloodshed, the worst in Tripoli for several months, began when militiamen opened fire, first into the air and then into hundreds of protesters who were demanding their eviction from the capital after the militias had repeatedly battled with other armed factions for control of certain neighborhoods.
A Reuters reporter saw an anti-aircraft cannon firing from the militia compound into the crowd as it chanted: "We don't want armed militias!"
Demonstrators at first fled but then returned, heavily armed, to storm the gated buildings, where militiamen from the central coastal town of Misrata were holed up past nightfall.
Dozens of soldiers in army trucks came to try to separate the crowds and militiamen in the compound, sealing off roads to prevent more armed people from joining the unrest.
Heavy smoke could be seen rising from the scene.
Air force planes circled overhead to monitor Tripoli's main roads. "We want to make sure the militia don't bring in any reinforcements," said army spokesman Ali al-Sheikhi.
Rival militia gangs and former fighters have refused to disarm since the downfall of Gaddafi, eroding the authority of the central government and severely disrupting oil exports from the OPEC member state.
Tripoli has been spared the almost daily bombings and killings that plague Benghazi, a city in the east of the vast North African state.
But clashes between rival militias sometimes break out in the capital, where Libya's nascent armed forces are still in training and are no match for the heavily armed militiamen.
Prime Minister Ali Zeidan has called for more foreign training for his military. Highlighting Libya's chaos is the fact that the premier himself was briefly abducted in October by a militia group on the government payroll.
Friday's demonstration began as a peaceful rally of some 500 people demanding the departure of Misrata gunmen who had fought twice last week with a rival group that had briefly detained one of their members for driving a car without number plates.
Libyan authorities have tried to co-opt the militias by placing them on the government payroll and recruiting them to provide security in Tripoli and other cities.
But the gunmen often remain loyal to their own commanders rather than to state authorities and fight for control of local areas and of weapon or drug smuggling, or to settle personal feuds.
Strikes and armed protests by militia and tribal gunmen demanding payments or more autonomy have also shut much of the country's oil output, depriving the government of its main source of income.