Libya risks sliding into civil war unless it cracks down on the rival militias which filled the vacuum left by Muammar Gaddafi's downfall, the head of the interim administration said after an outbreak of violence in the capital.
Mustafa Abdel Jalil, chairman of the National Transitional Council (NTC), issued the stark warning in response to a gun battle between militias in one of Tripoli's busiest streets which killed four fighters.
More than two months after anti-Gaddafi fighters captured and killed the former dictator, Libya's new rulers still struggle to exert their authority as rival militia leaders refuse to cede control of their fighters and hand in their arms.
"We are now between two bitter options," Abdel Jalil told a gathering in the eastern city of Benghazi late on Tuesday.
"We deal with these violations (clashes between militias) strictly and put the Libyans in a military confrontation which we don't accept, or we split and there will be a civil war."
"If there's no security, there will be no law, no development and no elections," he said. "People are taking the law into their own hands."
The militias, drawn from dozens of different towns and ideological camps, led the nine-month uprising, backed by NATO air strikes, to end Gaddafi's 42-year rule. Now though, they are reluctant to disband and lay down their arms.
They are vying with each other for influence, and believe that to ensure they receive their due share of political power they need to keep an armed presence in the capital.
The NTC has begun to form a fully functioning army and police force to take over the task of providing security. Abdel Jalil acknowledged though that progress has been too slow.
"We have no security because the fighters have not handed over their weapons despite the chances they've been given to do so through local councils," he said. "The response has been weak so far, people are still holding on to their weapons."
Tripoli is now an unruly patchwork of fiefdoms, each controlled by a different militia. Police are rarely seen - except when directing traffic - and there is no sign of the newly created national army.
Although their presence on the streets significantly declined towards the end of last month, militias still occupy security compounds previously used by Gaddafi's forces. Their presence increases in the streets of Tripoli as night falls.
Tripoli has two main home-grown militias. One is led by Abdel Hakim Belhadj, an Islamist who spent time in Taliban camps in Afghanistan and now runs his militia from a suite of rooms in a luxury Tripoli hotel. The other is headed by Abdullah Naker, a former electronics engineer who is openly disdainful of Belhadj.
There are also the militias from outside town. Fighters from Zintan, an anti-Gaddafi bastion south-west of the capital, control the international airport.
Militias from the city of Misrata, east of Tripoli, have mostly withdrawn from central Tripoli but keep a presence in the eastern outskirts of the city. Fighters from the Berber, or Amazigh, ethnic minority mark out their territory with their blue, green and yellow flags.
Another set of fighters from the east of Libya, the original heartland of the anti-Gaddafi revolt, add to the mix. The closest to the NTC's leaders, their ambitions to form the core of the new national army irk their rivals.
Until Abdel Jalil issued his warning about the militias, most senior government officials preferred to avoid the issue.
"What militia?" Prime Minister Abdurrahim El-Keib told Reuters this week when asked about the rival groups.
"Look around you! ... We're building the Libyan National Army and we want to guarantee that this army is effective when we need it," he said.
The militias are united by their shared experience in fighting Gaddafi. Their leaders profess loyalty to the NTC, and say they want to work together to build a new, democratic Libya.
This is a fragile unity which breaks down whenever one group impinges on the territory of another. Flare-ups in violence are most commonly triggered when fighters refuse to submit to checks when passing through a rival group's checkpoint, or when one group detains fighters from another militia.
The spark for a gunbattle in Tripoli on Tuesday was, by some accounts, the arrest by a Tripoli militia of several fighters from Misrata. The arrested men's comrades attacked the building where they were being held using anti-tank weapons and heavy machine guns.
"Some of them screamed 'We're from Misrata, you dogs!' while they were firing," said a Tripoli fighter.
On Wednesday, a few guards carrying semi-automatic machine guns stood outside the compound on Zawiya Street which had been the focus of the fighting a day earlier.
Militia vehicles that had blocked the intersection leading to the compound had been removed and the street, lashed by heavy rain, was mostly empty.
But the potential for outbreaks of violence remains.