Ten years since dictator Moamer Kadhafi was slain by Libyan rebels, the North African country is still struggling to emerge from the violence sparked by his overthrow.
A year-long ceasefire and a UN-led peace process have barely papered over deep divisions, and upcoming elections are unlikely to resolve the crisis, analysts say.
Kadhafi ruled Libya with an iron fist for 42 years after a 1969 coup against the monarchy, portraying himself as a revolutionary, Arab and African hero while mercilessly crushing all opposition.
In 2011, he was toppled in a revolt inspired by the Arab Spring uprisings and backed by NATO.
On October 20 of that year, rebels tracked him down to his hometown Sirte, tortured him and killed him in the street, displaying his body in a market.
His death has failed to bring democracy or stability.
Instead, Libya has fractured along regional and ideological lines, with an assortment of mafia-like militias and their foreign backers vying for control of the oil-rich country.
Last October's ceasefire was followed in March by the appointment of a unity government with a mandate to lead Libya to elections.
So with a presidential poll set for December 24 and legislative elections in January, is Libya finally turning the page on a decade of chaos?
"Relative to the past 10 years, Libya is in a much-improved situation," said Hamish Kinnear, an analyst with the research institute Verisk Maplecroft.
"The ceasefire agreed to in October 2020 continues to hold and the Government of National Unity is hanging on as Libya's sole government.
"But Libya's political stability is increasingly precarious," Kinnear told AFP.
"The next six months will tell us whether the quiet period that followed the October 2020 ceasefire was merely an opportunity for armed factions to lick their wounds or actual progress towards a political solution."
- Contested outcomes? -
Libyan academic Mahoud Khalfallah also voiced doubts that elections alone would lead to "a definitive solution" to the crisis.
That would require "an end to negative foreign involvement in Libya's internal affairs, maturity of Libyan voters in choosing who represents them, disregarding tribalism and regionalism, and all sides accepting the outcome of elections," he said.
None of those is a given.
The road to the ballot box has been paved with bitter debates over electoral laws, notably a bill on presidential polls that appeared tailor-made for a bid by military strongman Khalifa Haftar and was passed in a move many of his opponents say bypassed due process.
Haftar is despised by many in western Libya, particularly after the year-long offensive by his self-styled Libyan National Army to seize Tripoli, which killed thousands of people before he was pushed back by Turkish-backed armed groups in June 2020.
The strongman's portrait, with a vivid red cross over his face, now hangs on many official buildings.
Kinnear warned that polls based on the controversial law without wider backing from groups in the west could divide Libya once again into competing eastern and western governments.
"The risk of this would be heightened if Khalifa Haftar won the presidency, as he is a toxic figure for the armed factions that defended Tripoli during the LNA's failed offensive," he said.
- 'Irregularities' -
Foreign officials have prioritised holding elections and turned a blind eye to irregularities around the political process, including allegations of corruption around the February election of interim Prime Minister Abdulhamid Dbeibah.
"We are aware that there have been irregularities, even corruption, but we still believe that the solution lies in these elections," one European diplomat in Tripoli told AFP.
Analyst Ahmed al-Rashrash said Libyans were "hoping these elections will lead to a better life and to political stability and security".
But many voice doubts the process will resolve deep-seated issues.
"We're in a vicious cycle because of the failure of the political process," said Tripoli civil servant Abdelfattah Benour.
The situation has left some nostalgic for Kadhafi's era.
While the leader brutally stamped out all forms of opposition during his rule, many enjoyed high living standards paid for by Libya's vast oil wealth, with the highest GDP per capita in Africa.
That is a stark contrast to today.
A decade of conflict has ruined infrastructure and battered the economy, leaving Libya suffering chronic power cuts and runaway inflation.
That has left Libyans themselves suffering "both psychologically and economically", said Tripoli businessman Issam el-Mejri, although he said he felt "more freedom" since Kadhafi's fall.
Faraj Najib, who runs a small shop in the eastern city of Benghazi, said the elections were "a ray of hope for Libyans, who have been hugely impoverished" by the years of conflict.