TUNIS, June 21 (Reuters) - Germany and the United Nations host an international conference on Libya in Berlin on Tuesday. On the agenda will be political progress there, national elections scheduled for December, and the withdrawal of foreign fighters.
Members of Libya's transitional Government of National Unity headed by Prime Minister Abdulhamid Dbeibah are due to attend as well as world powers and regional players.
The last time such a conference was held, Libya's warring factions were fighting in the capital. Now, a truce has held since October and all sides have publicly accepted the unity government and planned elections.
However, big challenges remain.
What's behind the conflict?
Libya's fault lines surfaced a decade ago as local groups took different positions in the NATO-backed uprising that toppled Muammar Gaddafi.
An attempted democratic transition slid out of control as armed groups built local power bases and coalesced round rival political factions, seizing control of economic assets.
After a battle for Tripoli in 2014, one faction moved east and set up a parallel government and institutions. It recognised Khalifa Haftar as military chief as he began a long campaign against Islamist groups and other opponents in Benghazi.
As Islamic State gained a foothold in Libya and migrant smuggling to Europe surged, a U.N.-backed agreement led to a new government in Tripoli - but eastern factions spurned the deal.
Instead Haftar consolidated control of the east and his Libyan National Army (LNA) swept south in early 2019 before attacking Tripoli with backing from the United Arab Emirates, Russia and Egypt and blocking oil exports.
Turkey helped the Tripoli government repel the attack last year, leaving the frontline between Misrata and Sirte, halfway along the Mediterranean coast near oil ports.
How did political progress come about?
After Haftar's offensive collapsed, figures in east and west camps negotiated a resumption of oil exports and the United Nations brokered a ceasefire.
Meanwhile, the U.N. selected 75 Libyans to hold political talks on a roadmap. They agreed to replace the two rival administrations with an interim government to oversee the run-up to elections on Dec. 24.
The talks participants eventually selected a three-man presidency council headed by Mohammed al-Menfi, with Abdulhamid Dbeibeh as prime minister in a process publicly backed by all countries involved.
The long-divided, eastern-based parliament approved Dbeibeh's government in March and both the old rival administrations officially transferred power to it.
Will there really be elections in December?
Menfi, Dbeibeh and other members of the unity government have repeatedly vowed to go through with the election but there are obstacles - and private doubts about everybody's commitment.
Neither parliament nor the U.N. talks participants have agreed a legal basis for elections and some people want a referendum to take place first on a new constitution.
Meanwhile, myriad armed groups - some led by potential candidates in the election - still hold power on the ground, raising questions about whether a vote could be free and fair.
Privately, diplomats and analysts have also queried whether Dbeibeh or the old parliament really want elections that would push them from power.
What are the other reasons for concern?
The U.N.-backed roadmap calls for the unification of the military under Menfi's presidency council. However, the parliament did not ratify either the council or the roadmap.
So far the presidency council has steered clear of trying to assert control over the armed forces - a move that would likely trigger a confrontation with Haftar and possibly the parliament too.
In the west, armed groups continue to jostle for position and to assert their control over local areas and some state institutions. Abuses by fighters in both east and west have underscored the armed groups' continued power.
Some terms of the October ceasefire have not been met. The foreign mercenaries, sent by outside powers to bolster their local allies, remain entrenched especially around the frontline areas of Sirte and Jufra.
Their presence delayed the opening of the main coast road across the frontline linking the divided halves of the country. On Sunday Dbeibeh finally declared it open. But eastern forces said he had acted unilaterally and kept their side shut.
Meanwhile, parliament has blocked Dbeibeh's proposed budget - affecting his ability to win support for the unity government by improving state services and distributing largesse.
(Reporting by Angus McDowall and Aidan Lewis; Editing by Angus MacSwan)