Libya's two largest cities were rocked by violence on Sunday with clashes between militias wounding five in the capital and a car blast hurting three policemen in Benghazi.
Rival armed groups battled it out for more than 12 hours in a central residential area of Tripoli. The clashes centred around Zawiyah Street and frightened residents into taking up arms and setting up makeshift checkpoints.
"Five people have sustained gunshot wounds in these clashes," a medical official at Zawiyah Street Medical Centre said, adding there had been no fatalities.
The fighting came as the country's new authorities try to empower the national army and police but struggle to rein in armed militias born out of the 2011 conflict that toppled long-time dictator Moamer Kadhafi.
Some residents said the incident was sparked by a case of kidnapping and torture, while others said locals had armed themselves and tried to kick out a militia because it was selling drugs and alcohol.
Ali Mohammed, an armed resident manning a makeshift checkpoint on a small side street, told AFP: "Things are not clear. We are trying to protect our streets at this stage."
Another resident said the clashes pitted men from the neighbourhood against a militia holed-up in a building which once housed the country's former intelligence headquarters.
Smoke rose over the building as official state security forces deployed to the scene and later took control of the situation, an AFP photographer said.
Signup to our newsletter and follow us on Facebook and Twitter!
Street battles and score settling between rival groups are not unusual in the capital, which is still awash with weapons left over from the 2011 conflict.
In the eastern city of Benghazi, the cradle of the 2011 rebellion, a car exploded outside a police station on Sunday lightly wounding four police officers, according to the official LANA news agency.
The blast occurred before dawn, destroying the entrance of the building, unhinging a door and shattering windows, an AFP photographer said. The facades of nearby shops were also damaged.
Security is by far the most urgent issue that the next government, which is due to be sworn in on Thursday, must tackle in order to achieve its mandate of organising elections on the basis of a new constitution within a year.
The general assembly, the country's highest political authority which was elected in July, grasped its own vulnerability this week when protesters barged into a session and gunmen occupied the premises for over 24 hours.
Assembly members on Sunday debated relocating the session to another city.
The security situation is precarious in the oil-rich nation where inter-communal tensions and rivalries that surfaced during last year's civil war often along deeply entrenched tribal and regional fault lines.
The nascent national army and police force remain outgunned by a patchwork of militias made up of former rebels, who have been co-opted with varying degrees of success by state authorities.
Many former rebels distrust the police and army and accuse the authorities of failing to purge them of members who played a role in upholding the repressive regime of slain dictator Kadhafi.