Fresh clashes erupted in Tripoli on Saturday as the death toll from a shootout at an anti-militia protest rose to 43 and the weak, post-revolutionary government appealed for restraint.
More than 450 people were wounded when Friday's protest sparked clashes in the capital between rival militias that continued through the night, Justice Minister Salah al-Marghani said.
Prime Minister Ali Zeidan appealed for "restraint and a halt to the clashes", warning that the entry of more armed groups into the volatile city could only "further complicate the situation".
"The coming hours and days will be decisive for the history of Libya and the success of the revolution," stressed Zeidan, who was himself abducted by militiamen and held for several hours last month.
Libya has seen a surge in unrest as former rebels who helped end Moamer Kadhafi's four decades of dictatorship have scoffed at government demands to lay down their arms or join the security forces.
The latest violence erupted when protesters carrying white flags marched on a cluster of villas that serve as the Tripoli base of the Misrata brigade -- made up of battle-hardened fighters from the western city of the same name -- and demanded that they leave the capital.
Gunmen opened fire from inside the villas, killing several protesters and prompting rival militias to attack the base, setting part of it ablaze and briefly expelling the Misrata fighters.
The western city of Misrata, Libya's third largest, saw some of the fiercest fighting of the 2011 uprising, and its fighters eventually advanced to Tripoli as Kadhafi's regime crumbled.
Reinforcements rolled into the capital overnight from the militia's headquarters in Misrata, 200 kilometres (120 miles) away, and retook the base in Ghargour as explosions and gunfire echoed across the city.
The Misrata brigade attacked an army barracks early Saturday, setting off clashes in which one person was killed and eight wounded, according to Colonel Mosbah al-Harna, commander of a brigade nominally under the authority of the defence ministry.
Harna said the Misrata militiamen then looted the base, taking away vehicles, weapons and ammunition.
Another column of Misrata reinforcements tried to enter Tripoli from the east, setting off clashes with rival militias.
Military police restricted access to the Gharghour district on Saturday, warning motorists of the risks.
"Heartbreaking to hear continuing gunfire. An insult to the memory of the martyrs," US ambassador Deborah Jones tweeted.
The UN mission in Tripoli also condemned the violence, urging Libyans to "exercise maximum restraint and resort to peaceful means to resolve their differences".
March was a 'peaceful' protest
Zeidan said at first that armed demonstrators were involved in the clashes and that security forces had not intervened "so as not to complicate the situation".
But he later backtracked to say the protest march had been "peaceful" and came under fire when it entered Gharghour.
Last week Zeidan had urged Libyans to rebel against militias, saying: "The people must take to the streets... and support the building up of the army and police."
In sermons at midday Muslim prayers on Friday, imams backed the call for protests.
Sadat al-Badri, president of Tripoli city council, which had called Friday's protest, insisted the demonstrators were unarmed and had been shot at from inside the Misrata militia headquarters.
Gunmen inside the base had initially fired into the air to try to scare off the protesters -- who had children with them -- but when the demonstrators kept advancing the militiamen lowered their barrels and shot into the crowd, an AFP correspondent said.
A Misrata commander told private television channel Al-Naba that demonstrators had opened fire first.
The march was a response to heavy clashes on November 7 between the Misrata brigade and a rival militia.
The rebels who overthrew Kadhafi were hailed as heroes following his ouster, but many have since carved out their own fiefdoms and been accused of mafia-like extortion and other crimes.
Libyans have staged several protests against the militias, and in June more than 30 people were killed when protesters -- some of them armed -- marched on the barracks of a powerful militia in the restive eastern city of Benghazi.