Libya has been deeply unstable, with outside powers providing support to rival armed factions since Muammar Gaddafi was toppled in a 2011 uprising. In an attempt to break the cycle of violence, world leaders attended a peace summit in Germany at which they agreed to uphold a UN arms embargo and end military backing for the North African country's warring factions. Moina Spooner from The Conversation Africa asked Jacob Mundy for some background.
Would you use the description 'failed state' to describe Libya?
I wouldn't use the term failed state. I would say it's a divided state.
In Tripoli you have a United Nations-recognised executive authority called the Presidency Council. It is chaired by Fayez Serraj. The authority is backed by powerful militias and interest groups, mainly in the west of the country, as well as Turkey and Qatar.
In the east there's a parliament that supports Khalifa Haftar, who has managed to build a powerful rival coalition of militias called the Libyan National Army. This has enabled him to extend nominal authority over most of Libya since 2014 - albeit with significant fiscal and military aid from Egypt, the United Arab Emirates, Saudi Arabia, Jordan and at times France and Russia.
Haftar's supporters often frame him as the best option for stability in Libya. Libya is also caught up in a complex regional struggle - as was Syria - where countries like Saudi Arabia and Egypt appear to be on one side with Turkey and Qatar on the other. France and Russia have historically been major arms suppliers to Libya, a role they would like to continue once a friendly government is in place.
Since April last year Haftar has been engaged in a 'final assault' on Tripoli. It is this fighting that tends to get all the international attention.
But there's a lot more going on. Even after nearly a decade of civil war, there are still local and national state institutions that function, though the quality and legitimacy of those institutions varies a lot across the country.
There are also economic development initiatives, foreign investments, infrastructural projects and - recent disruptions aside - Libya often exports as much oil now as it did before the 2011 uprising.
It's a complicated, often paradoxical picture in Libya today. One that easily defies descriptors, like 'failed state', or comparisons with other conflicts, like the war in Syria.
What are the main drivers that have got the country into this state?
The country experienced great national unity during the Arab Spring revolution in 2011 which resulted in the toppling of Muammar Gaddafi's government. But this quickly dissipated as new and old ideological fissures deepened. There were long repressed movements - like the Libyan Muslim Brotherhood - that were determined never to see the return of anything like the Gaddafi regime. On the other hand, many communities felt that the 2011 uprising was being used as an excuse for all kinds of violence aimed at marginalising former regime elements and plundering the state.
As Libya became more insecure, more militias formed. Though some wanted to become professionalised security forces, others simply became extortion rackets and got involved in criminal activities. They looted state assets and basically held the country hostage.
A major problem was not only the lack of a legitimate transitional national authority, but also the lack of a neutral third party - like a multilateral peace-building mission - to disarm the militias.
The post-revolutionary fissures in Libya cracked wide open when an election in 2014 proved to be so indecisive that two competing governments emerged. It was also the year in which Haftar launched his military campaign from the east of the country.
His latest assault on Tripoli shows that his aim is to impose military rule over the rest of the country, as he has done in the east.
Which countries are best placed to broker peace, and why?
The biggest question in Libya today is whether the key external enablers of the conflict can also be peacemakers.
The United Arab Emirates and Egypt are Haftar's strongest enablers. Russia also offered assistance to Haftar's forces, notably a contingent of mercenaries that helped stave off his defeat in Tripoli this fall.
On the other side, Turkey and Qatar are important conduits of support for the coalition backing Serraj's administration. Turkey has made matters worse by sending veterans of the Syrian civil war to Libya to bolster Serraj's forces.
Despite this complexity, it's nevertheless encouraging that Russia's president, Vladimir Putin, and Turkey's president, Recep Tayyip Erdoğan, have recently joined Germany's effort to enact a ceasefire.
Recently, the US has appeared to be supportive of the process in Berlin. But the Trump administration's position has, for the most part, been ambiguous and not helpful.
Key to peace in Libya is support by states, and the Security Council, of the UN arms embargo. Since the beginning of the uprising in 2011, there has been an arms embargo on Libya, which is still present. Yet year after year, a panel of UN experts consistently reveals the extent to which both light and heavy arms - from armoured personnel carriers to drones - have found their way from other states to the frontlines in Libya.
The most grotesque aspect of the civil war in Libya has been the naked violations of the embargo. But even if there was political will to enforce it, most arms come through Libya's vast and porous land borders, not by sea. Countries like Egypt, Sudan and Tunisia would have to help enforce the embargo, but they are some of the worst violators.
Is peace possible, and what are the biggest stumbling blocks?
A real ceasefire would be a good start, but a comprehensive peace agreement is a long way off. The Libyan peace process has suffered from a lack of effective international leadership and a case of 'too many cooks in the kitchen'.
Currently German leadership is perhaps the only viable option, as Russian, French, Italian, Turkish, Arab and Maghreb-led initiatives have all suffered from being viewed as overly biased or weak. Germany might the best option to manage all of the players in the Libyan crisis.
But having come so close to taking the capital, it's difficult to imagine Haftar giving up easily. It's also difficult to imagine progress towards a comprehensive and durable peace without a more robust UN presence in Libya, one that not only has a serious disarmament mandate but also a mandate to enforce an arms embargo.