The head of Libya's interim government warned yesterday that the country could descend into civil war after rival militias fought gun battles in the centre of the capital, Tripoli, leaving a trail of dead and injured.

Mustafa Abdul Jalil spoke of the dangers posed by continuous lawlessness of private armies while the draft regulations for the first parliamentary elections scheduled for later this year were being published.

But the rules were immediately attacked with claims that they risk creating upheavals of the type triggered by the "De-Baathification" programme introduced in post-Saddam Iraq by the US envoy Paul Bremer. Some of the thousands, with links to the former regime, who were sidelined as a result took up arms and joined the insurgency that still continues.

The terms proposed in Libya by the National Transitional Council (NTC) for candidates would automatically bar not only those associated with the Gaddafi regime, but even anyone who received an academic qualification based on the late dictator's political treatise, The Green Book. Those holding dual nationality would also be disqualified unless they abandoned their second passport.

Critics warned the wording of "association" with the former regime was too loose for what was a centralised hierarchy with widespread state control. Study of Colonel Gaddafi's rambling thoughts on governance, they added, was often necessary to get a civil service post. And the nationality rule, it was said, would put off many from the diaspora who returned to take part in the revolution.

But it was the continuing violence five months after Tripoli fell to the revolutionaries that was the cause of immediate concern. In the latest clashes, fighters from Misrata attempted to storm a jail in which a number of their comrades were being held. Seven men were killed and a dozen wounded in two separate firefights.

Mr Jalil, the chairman of the NTC, said: "We are now between two bitter options. We deal with these violations by brigades 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."

The transitional government wants the militias, which sprang up during the uprising against Gaddafi, to join the national security forces. However, attempts to get the fighters to disarm have largely failed

Against this backdrop, Youssef Mangoush, once a special forces commander under Colonel Gaddafi who defected at the start of the revolution, has been named as the new chief of staff of the military and tasked with integrating the militias. But the strife in Tripoli showed the difficulties he faces. Shooting began after a Misrata brigade member was arrested for alleged robbery.