ALGIERS Behind Libya's flare-up of violence and protests in the past five days lies a quandary.
How do you share out power in the new Libya when the jumble of tribes, militias and interest groups do not trust each other and, even worse, when the people supposed to be acting as neutral referees are widely mistrusted?
It would be a tough problem to solve for any country. For Libya, with a lack of institutions that its people view as legitimate, it seems - for now at least - to be insurmountable.
And so people are tempted to resort to violence in defense of their interests, especially when militia men with anti-aircraft guns and beyond the control of government are already roaming the streets.
The risk is that Libya could slip from being the triumph against dictatorship that was trumpeted just a few months ago by Western powers to a maelstrom not unlike Iraq after the U.S.-led invasion in 2003.
"Comparisons to Iraq circa 2004 are tempting," said Geoff Porter, of North Africa Risk Consulting. "Factional fighting, a government whose legitimacy is being openly challenged and no immediate prospect of the return of a peaceful society."
He said there were important differences between Libya and Iraq, however. In particular, Libya has no occupying power and many of the country's oil fields are back on stream and bringing in cash for the government.
But on the evidence of the past seven days things could get worse. Libya's interim ruling body, the National Transitional Council (NTC), was pitched this week into its biggest crisis since Mummar Gaddafi was overthrown nearly six months ago.
In the eastern city of Benghazi, cradle of the anti-Gaddafi rebellion, crowds disappointed with the performance of the NTC stormed an office building when the council's leader, Mustafa Abdel Jalil, was inside. His deputy later resigned.
Two days later, the town of Bani Walid, home of the country's most powerful tribe, the Warfallah, took up arms and forced the militia stationed there by the NTC to flee.
That came against a background -- almost routine for Libya since Gaddafi's rule ended -- of regular gunfights between rival militias in Tripoli and turf wars between neighboring tribes.
Each of these flare-ups were triggered by their own set of circumstances but they have a common theme: a lack of faith that Libya's transition will deliver an equitable distribution of power and a fair share of its oil wealth.
Libya is caught in a Catch-22: the country needs an election to create legitimate institutions, but without a legitimate institution to oversee the election, the process will not work.
WHAT STAKE IN THE NEW LIBYA?
Mustafa Fetouri, a Libyan writer and academic originally from Bani Walid, said underlying the revolt in the town was a fear that the Warfallah tribe is going to be deprived of its rightful place under the new order.
"In numbers the Warfallah dominates Libya and if there is going to be one man, one vote and if this tribe along with a couple of others .... get organized then they will dominate political life for decades to come," he told Reuters.
But there are signs the tribe is being squeezed. In Tripoli, the influential players are from cities like Benghazi, Misrata, and Zintan, which led the fight against Gaddafi's forces during the nine-month civil war.
In Bani Walid, which held out for months against the anti-Gaddafi forces before suing for peace, the atmosphere is one of neglect. In the main square, buildings smashed in battles last year are unrepaired, and the town hospital does not have mattresses for all its beds.
"The NTC has played a negative role ... The goal is to teach Warfallah a lesson," Fetouri told Reuters.
"It will be bloody and fruitless. Warfallah will never give in. Not in a hundred years. They will keep trying to assert their own authority."
LACK OF TRANSPARENCY
In Benghazi, the protesters who at the weekend smashed their way into the NTC leader's office, are at the other end of Libya's political spectrum. This was the city which started the rebellion in February last year.
Yet in Benghazi too, people have taken to the streets because they feel unable to trust the opaque political process.
The NTC, a collection of lawyers, defectors from the Gaddafi administration, civil rights activists and tribal elders, is recognized by the West but it has never been elected.
It was hastily cobbled together in Benghazi at a time when Gaddafi's forces were shooting at protesters in the streets, and since then it has expanded to include representatives from other parts of the country.
Local councils in each area -- themselves unelected -- nominate people to sit on the NTC, but some areas are entitled to more nominees than others. One of the biggest, Benghazi, has seven NTC members, while 20 districts have nominated no one.
The council has 57 sitting members, yet its Internet site lists the names of only 43 of them. Its sessions are held behind closed doors. Key decisions are delegated to committees but little is known about how they were created.
"The NTC takes decisions by themselves. They sell 1 million barrels of oil a day and nobody knows where the money is going," said Najat al-Moghirbi, a professor of dentistry at a protest in Benghazi's Shajarah square.
When he was hijacked by the protesters, the NTC chief was preparing to unveil a law setting out the rules for an election, to be held within about six months, for a new interim assembly.
But the announcement was postponed after a draft of the law was released and caused an outcry. Critics said the law would give some groups an unfair advantage in the election, and they also said it had been drafted without proper consultation.
Crispin Hawes, of Eurasia Group, said public anger was sparked, at least in part, by a "lack of transparency over the NTC's decision-making process."
"If the NTC is unable to convince the population at large that the transition is in safe hands there is a serious risk that the militias will see their weaponry not as a potential bargaining chip but as a method of taking control," he said.
LEVEL PLAYING FIELD
Libya's interior minister, Fawzi Abdel A'al, acknowledged the pressure for a more accountable government. "In many places protesters say 'We do not need the Gaddafi way of appointing officials. We need elections'," he said Tuesday.
An election should relieve the pressure by giving Libya a governing body with legitimacy and a popular mandate. But the process of holding an election is itself a minefield.
Whichever voting system is chosen stands a good chance of angering one or several of Libya's competing interest groups.
A one-man, one-vote system would favor the Warfallah tribe and squeeze out the groups which made the biggest contribution to the revolution, especially the cities of Benghazi, Misrata and Zintan.
Handing equal representation to each of Libya's administrative areas would give influence to sparsely populated patches of desert and leave urban centers under-represented.
A system that gives the biggest representation in the new assembly to the biggest population centers would favor Benghazi, Misrata and Tripoli.
It would, though, work against the Warfallah, who are spread around the country, and Zintan, which is much smaller but has some of the most powerful militias.
Libya does not have any precedent to fall back on because Gaddafi, in power for 42 years, banned elections. He argued that they were "dictatorship ... garbed in the guise of democracy."
A peddler of eccentric theories but also a pragmatist, Gaddafi may have realized that holding an election in Libya was fraught with too many problems.
Some observers have suggested the NTC could bring in a neutral consensus figure to help persuade people there will be a level playing field for elections, in the same way neighboring Tunisia did after its revolution.
One such person could be Abdel Salam Jalloud, who helped Gaddafi to power in a military coup in 1969 but then fell out with him and was sidelined for decades. He defected to the rebel side in the civil war.
From the younger generation, Fethi Tarbel is widely acknowledged as a hero of the revolution. A human rights lawyer, his arrest in Benghazi sparked the uprising. He is now minister for youth and sport.
There might conceivably be a role for descendants of King Idris, whom Gaddafi overthrew in his 1969 coup. His family has since lived in exile.
But in a country so deeply divided, any figure will struggle to restore faith in the transition to democracy.
(Additional reporting by Oliver Holmes and Ali Shuaib; Editing by Robert Woodward)