Tripoli - Libyans go to the polls on Wednesday for a general election seen as crucial for the future of a country hit by months of political chaos and growing unrest.
Over the past few weeks, Libya has been rocked by a crisis that saw two rival cabinets jostling for power while violence raged in the east, where a rogue general is battling Islamists.
Jihadists and other militias who helped topple dictator Muammar Gaddafi in the Nato-backed uprising of 2011 have been blamed for violence that has continued unabated since the end of the revolt.
The heavily armed rebels that ousted Gaddafi have carved out their own fiefdoms in the deeply tribal country, some even seizing oil terminals and crippling crude exports from a sector key to government revenues.
Commentators have warned violence could scupper the vote, but the authorities are confident it will go ahead without disruption.
There are hopes a new General National Congress, or parliament, will work to resolve the power struggle between liberals and Islamists that has stymied efforts to reform Libya and brought it to its knees.
The GNC, which has served as Libya's highest political authority since Gaddafi’s ouster, was elected in July 2012, in the country's first ever free polls.
But it has been mired in controversy and accused of hogging power, with successive governments complaining its role as both executive and legislative authority has tied their hands in taming militias.
The crisis came to a head in February when the assembly, whose term had been due to expire, decided to prolong its mandate until December.
That sparked street protests and forced lawmakers to announce the election.
Almost 3.5 million Libyans are eligible to vote but only 1.5 million have registered, a far cry from the more than 2.7 million who registered two years ago.
Voters will choose from among 1 628 candidates, with 32 seats in the 200-strong GNC reserved for women and would-be MPs banned from belonging to any political party.
For analyst Salem Soltan, none of the candidates standing in the elections "carry the political or social weight" needed in the assembly.
The new parliament risks "being run by shadow MPs, who will act according to instructions from warlords and militias," he said.
There are concerns that violence will mar polling day, particular in the unrest-hit east, scene of a deadly 2012 attack by jihadists on the US consulate in Benghazi.
"Generally, we are optimistic, but there is a risk that the vote will be disrupted in some polling stations, namely in Benghazi and Derna," both Islamist strongholds, an electoral official told AFP.
Last week, the government instructed the interior ministry and the armed forces to come up with a security plan for the vote.
The task is not expected to be easy.
Authorities have been struggling to build a strong army and police force and now face defections from members of the security forces who have joined the ranks of rogue general Khalifa Haftar who is battling Islamists in Benghazi.
Haftar, accused by authorities of trying to mount a coup, said he would observe a truce during the vote, but the Islamists did not divulge their intentions.
The UN Security Council urged Libyans to ensure that the election is held peacefully, warning that it is an "important step in Libya's transition towards stable democratic governance."
A Western diplomat warned against electoral fraud and said the next challenge would be if Libyans rally around the vote.
"The challenge is not holding an election. The success of the vote will depend on whether all influential players in the country will accept its results."