A gun battle in the Libyan capital Tripoli between forces loyal to the transitional government and gunmen they say support fugitive ex-leader Col Muammar Gaddafi has now ended.
It was the first serious confrontation in Tripoli since the city fell to the forces of the National Transitional Council (NTC) in August.
The fighting started after a demonstration by Gaddafi loyalists.
A hospital doctor has told the BBC that nine people were seriously injured.
Although the gun battle has finished, the BBC understands that NTC forces are carrying out an operation to root out Gaddafi loyalists from the Abu Salim district at the centre of the disturbance.
Security vacuum
The BBC’s Caroline Hawley, in Tripoli, says there are reports that the green flag of the Gaddafi government was raised in other towns as well.
An eyewitness has told the BBC the green flag was also raised in the Daraa area of Tripoli, where a small group of Gaddafi supporters were on the street.
NTC forces cordoned off the area, fired warning shots and stopped cars to search them. However, the witness did not see anyone being detained.
Our correspondent says this is likely to rattle the transitional authorities of the NTC, who are trying to exert control in the midst of a political and security vacuum.
Friday’s fighting took place near a notorious prison where political prisoners were held under the previous government.
The area is a stronghold of support for Col Gaddafi.
An eyewitness told the BBC he saw about 20 pro-Gaddafi fighters come out firing AK-47s.
Forces loyal to the NTC engaged them from pick-up trucks fitted with heavy machine guns, the eyewitness said.
A fighter with Tripoli’s Eagle Brigade, Assem al-Bashir, told the Associated Press the shooting began after a man was spotted raising the green flag that symbolises Col Gaddafi’s ousted government.
There are unconfirmed reports that between 20 and 100 pro-Gaddafi fighters were involved.
A BBC journalist in Tripoli saw over 200 NTC fighters from eight different brigades in the streets.
A doctor at the Tripoli Medical Centre told the BBC nine people were seriously injured in Friday’s clashes.
There are also reports that Gaddafi loyalists have appeared on Libya’s western border with Tunisia, where they have apparently attacked cars.