By Mohammed Al Tommy and Marie-Louise Gumuchian
BENGHAZI/TRIPOLI (Reuters) - Libyans took to the streets on Friday to celebrate the first anniversary of the uprising that toppled Muammar Gaddafi, but some rued the insecurity and disorder that still stalk a country preparing for its first free election.
Flag-waving crowds converging on Martyrs Square in the capital Tripoli or Freedom Square in Benghazi, cradle of the revolt, had to negotiate extra checkpoints set up authorities to stop Gaddafi loyalists from disrupting festivities.
Spontaneous celebrations began on Thursday night when men, women and children emerged on the streets of Tripoli, Benghazi and other towns waving flags and chanting.
"Despite the problems that remain in the country, this is an amazing day and we want to celebrate," a 22-year-old engineering student called Sarah said in Tripoli. "Just look at what was achieved in this past year."
Life for many people has improved since the eight-month NATO-backed struggle against Gaddafi and its chaotic aftermath, but security and political woes abound ahead of the June poll.
As it tries to build a democratic state, the ruling National Transitional Council (NTC) is struggling to impose its authority on a country awash with weapons and to form a functioning national police force and army.
Heavily-armed militias have stepped into the vacuum, carving out local fiefdoms. Their fighters say they are loyal to the NTC but answer only to their own commanders. They often clash because of disputes over who controls which neighborhoods.
Ezzieddin Agiel, who teaches engineering at Tripoli University, said insecurity could undermine the June election.
"The biggest achievement of the revolution was to end the Gaddafi regime and put a stop to his family's corruption. The elections reflect the Libyan quest to build the state and constitution," he added.
"The weakness of the political institutions may lead to serious problems for Libya, which may be difficult to control."
As well as imposing order, the government must also rebuild an ageing and damaged infrastructure and boost weak health, judicial and educational systems in the oil-producing country.
Libya's new rulers have not organized official celebrations at a national level, as a mark of respect for the thousands of people killed in the conflict that ended with Gaddafi's capture and killing on Oct 20. However NTC chairman Mustafa Abdel Jalil is expected to appear in Benghazi for the occasion.
Celebrations in Benghazi, the city which first rose against Gaddafi's 42-year rule, began on Wednesday evening with a torch-lit march to recall the first protest a year ago.
The NTC says die-hard Gaddafi loyalists might disrupt the anniversary, but perhaps the biggest risk in Benghazi is from protests by disgruntled supporters of the anti-Gaddafi revolt.
Last month, Abdel Jalil was confronted in Benghazi by a furious, bottle-throwing crowd who complained the NTC was trashing the values of the revolution because it was not transparent about how it spent oil revenues and included officials who had served under Gaddafi.
"The NTC seems incapable of addressing growing popular anger aimed at it and its chairman Mustafa Abdel Jalil over the transition process," said Crispin Hawes of the Eurasia Group consultancy.
February's uprising began in the long discontented east of Libya around Benghazi, inspired by unrest that overthrew leaders in neighboring Tunisia and Egypt, and then ground slowly across the country before the sudden fall of Tripoli in August.
Gaddafi was killed two months later when he was found hiding in a storm drain after fleeing an attack on his home town of Sirte. Grainy mobile phone footage of his last moments, bloodied and bewildered as rebels dragged him along a road, recorded the grisly climax of the conflict.
Several of Gaddafi's children are in exile in neighboring countries, from where some have made so far fruitless appeals for a counter-revolution. The most prominent son, Saif al-Islam, who at one stage was tipped to succeed his father, has been held by a militia in the Libyan town of Zintan since he was captured disguised as a Bedouin tribesman deep in the Sahara desert.
Highlighting the weakness of Libya's central government, local commanders have refused requests to hand him over to the authorities in Tripoli.
(Additional reporting by Ali Shuaib; Writing by Marie-Louise Gumuchian; Editing by Alistair Lyon)