Rival state-sanctioned Libyan militias fired guns and rocket-propelled grenades at each in the Libyan capital on Sunday, leaving the police powerless to protect locals.
At least five people were wounded and a stray bullet entered a hospital, causing panic and increasing concerns about Libya's precarious security situation a year after the ouster of Moammar Gathafi.
By early afternoon the headquarters of a Supreme Security Committee (SSC) militia, a body set up last year to try to regulate armed groups, was in flames and being looted by members of a rival militia faction, witnesses said. Local shops were also looted.
The fight erupted just after midnight due to a dispute over a detained member of one of the armed groups, residents in the southern district of Sidi Khalifa said.
Both militias are affiliated to the SSC, an umbrella group for various armed groups that refused to join the official police or army, saying they were still run by Gathafi loyalists.
Civilians blocked the street where the fighting raged to prevent cars from entering the battleground where the sound of gunfire rang out. Many civilians went home to get their own arms.
"We called the police early in the morning to help us stop the shooting, but no one came," resident Khaled Mohamed said.
A stray bullet caused panic at the nearby Tripoli Central Hospital, sending doctors and nurses running for cover. Dr. Khaled Ben Nour said five casualties had been brought in.
"We have real patients with real needs. These rogue militias need to leave us in peace so we can do our jobs," Ben Nour said.
SSC members at the scene said that the SSC headquarters - a former intelligence building - had been occupied by one particular militia belonging called Support Unite No. 8 led by Mohamed al-Warfali.
A group of rival militias - also belonging to the SCC - fired at the building from a former post office.
"Mohamed al-Warfali and his lawless group of men have occupied the SSC building and refuse to come out," said m ilitia member Mohamed al-Himrazy who accused Warfali's group of breaking SSC rules.
The SSC, run and paid for by the Interior Ministry, is much better armed that the official police. The ministry has repeatedly promised to disarm the militias but has yet to do so, to the disgust of many Libyans.
"The government needs to find a solution for this security mess," said resident Khaled Ahmed.
"It's been two years since the revolution and there is still no security. They either need to find a solution or we take to the streets again."
Apart from draining public finances, the SSC has also become a security headache. SSC members have been involved in kidnappings and intimidation across the country.
About 2 km (1.2 mile) from the gun battle, elected members of the General National Congress were debating whether their location should be changed to a different city because of recurrent attacks on their building.
The GNC grounds and building have been stormed on several occasions by protesters or armed militias unhappy with the formation of the government or other policies.
Security wasn't only tenuous in the capital on Sunday.
A car bomb exploded on Sunday in front of a police station in Benghazi, injuring three police officers in the latest in a series of attacks on security officials in Libya's largest city.
The front of the central Hadayeq police station was charred and blackened with smoke. The entrance to the station was completely damaged, with glass strewn on the street and firefighters putting out a damaged police car that was on fire.
A photographer saw three policemen receive first aid for small injuries in front of the station. Officials at the scene said there were no deaths.