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 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 toward 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 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.
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.
The tension will always arise because there are many groups, said Hakim Abdul Rahman Hammad, a former military pilot who now heads the military council of Tobruk, a city on Libya's border with Egypt.
There are many armed groups and there might be interaction among them that ends up in confrontation, he told Reuters.
The militias' dominance in Libya has now reached a crucial crossroads, with the appointment this week of a chief of staff for the new national army.
Until now, the militias have said they cannot surrender their weapons and allow their fighters to be absorbed into the army because the command structure was not in place.
By naming Yousef al-Manqoush, a retired general from Misrata, as head of the armed forces, the NTC presents the militias with a choice - they must either start ceding control to the army or openly defy Libya's leadership.
In an interview broadcast on Libyan television, al-Manqoush said the mechanism for absorbing former militia fighters into the military would be ready soon.
My message to the revolutionaries is ... they have to prove to the world once again that they are patriotic Libyans, prove to world that they will integrate into the state's institutions and work on building a strong national military, he told Libya Al Hurra television station.
But the militias will require convincing. One member of Misrata's military council said he was still not sure the time was right for the militias to relinquish their role.
When the state proves it's able to take responsibility to protect border and secure the country, then we will hand our arms, said the council member, Fethi Bashaga.
Naker, the head of one of Tripoli's two main, home-grown militias, said he welcomed the appointment of an army chief of staff and said he would cooperate with him.
But he too, had conditions for handing over weapons and advising his men to join the national army.
We will do so after we guarantee the revolutionaries' rights and their salaries, he told reporters Sunday.
We gave them the absolute freedom to join the military, the police or hand their arms and take up a civilian job, but before we hand them (fighters and weapons) over we want a mechanism, we want to know how much they will be paid, Naker said.
(Additional reporting by Taha Zargoun in Tripoli and Mohammad Al Tommy in Benghazi, Libya; Writing by Mahmoud Habboush and Christian Lowe; Editing by Louise Ireland)