Why is Libya so lawless?
Libya has been beset by chaos since Nato-backed forces overthrew long-serving ruler Col Muammar Gaddafi in October 2011.
The oil-rich country, a key departure point for some of the thousands of migrants travelling to Europe, once had one of the highest standards of living in Africa, with free healthcare and free education.
But the stability that led to its prosperity has been shattered and the capital, Tripoli, is now the scene of fighting between rival forces as negotiations to build a post-Gaddafi Libya stall.
Is anyone in control?
Only Libya's myriad armed militias really hold any sway - nominally backing two centres of political power in the east and west with parallel institutions.
- Tripoli administration, the internationally recognised government, known as the Government of National Accord (GNA)
This is under the leadership of Prime Minister Fayez al-Sarraj, an engineer by profession. He arrived in Tripoli in March 2016, four months after a UN-brokered deal to form a unity government, to set up his administration. He has worked to gain the support of the various militias and politicians, but he has little real power and the GNA's writ barely extends inside Tripoli.
- Tobruk administration, includes the parliament elected in 2014 after disputed elections
When those who held power in Tripoli refused to give it up in 2014, the newly elected MPs moved to the port of Tobruk, 1,000km (620 miles) away, along with the old government. In 2015 some of these MPs backed the UN deal for a unity government, but the parliament has since refused to recognise it and has been blocking efforts to organise fresh elections because it wants military strongman Gen Khalifa Haftar, who leads a powerful force called the Libyan National Army (LNA), to be guaranteed a senior role in any new set-up.
Some go as far as to suggest that Gen Haftar has ambitions to be "the Sisi of Libya", a reference to Gen Abdul Fattah al-Sisi, who seized power in neighbouring Egypt and is his major backer.
And it is guns that matter. Some security analysts describe Libya as an arms bazaar. It is awash with weapons looted from Gaddafi's arsenal and from allies in the region supporting rival factions.
Militia allegiances often shift out of convenience and with the need to survive.
Weren't they all once allies?
They were united in their hatred for Gaddafi - but nothing more. There was no single group in charge of the rebellion. Militias were based in different cities, fighting their own battles.
They are also ideologically divided - some of them are militant or moderate Islamists, others are secessionists or monarchists, and yet others are liberals. Furthermore, the militias are split along regional, ethnic and local lines, making it a combustible mix.
And after more than four decades of authoritarian rule, they had little understanding of democracy.
Former US President Barack Obama, in an interview published in April 2016, said that the "worst mistake" of his presidency was the failure to prepare for the aftermath of Gaddafi's overthrow.
He partly blamed then-UK Prime Minister David Cameron for "the mess", saying he had not done enough to support the North African nation.
Who is Gen Haftar?
He helped Gaddafi seize power in 1969 before falling out with him in the 1980s and going into exile. He returned amid the uprising against Gaddafi to fight against his former boss - and in the aftermath cast himself as the main opponent of the Islamist militias in eastern Libya.
For three years he battled various Islamist militias, including groups aligned to al-Qaeda, in the eastern city of Benghazi. However, his critics accused of him of labelling anyone who challenged his authority as "terrorists".
He is undoubtedly the most-powerful general in Libya, with his forces controlling most of the country, including Benghazi and Sirte, the birthplace of Gaddafi and a former stronghold of Islamic State (IS) group jihadists. He is also believed to control most of Libya's oil reserves.
Observers say he has set his sights on the top job, but the main bone of contention has been a clause in the UN-brokered agreement that prevents a military figure taking political office.
Does he have international backing?
Yes, he has long had the support of Egypt and the UAE - and made a visit to Saudi Arabia a week before he launched the offensive on Tripoli in April 2019.
Gen Haftar has made several trips to Russia, been welcomed on a Russian aircraft carrier off Libya, and Russia vetoed a UN Security Council statement condemning his advance on Tripoli.
Turkey has also accused Russia of sending about 200 mercenaries to strengthen his forces, an allegation Russia denies.
At the same time, Libya's UN-backed government is suspected to have hired Syrian fighters, which the prime minister did not deny in a BBC interview.
Turkey has deployed troops to support the UN-backed government, but President Recep Tayyip Erdogan and his Russian counterpart, Vladimir Putin, have come together to try and broker a ceasefire fire.
They have had limited success, with Gen Haftar leaving talks in Moscow in mid-January without signing a deal.
Observers said it showed that Gen Haftar was not heavily reliant on Russia, for as long as he had the backing of regional superpower Egypt and the UAE.
The latest mediation effort came from Germany, which hosted a summit of foreign leaders in Berlin on 20 January. The leaders promised to uphold a UN arms embargo on Libya, but little else was achieved and the chances of a ceasefire taking hold still looked far-fetched.
Germany's Foreign Minister Heiko Maas warned that Libya could become a "second Syria" and the "scene of proxy wars" if peace was not negotiated.
Most Western nations back the unity government, but there have been suspicions about France's relationship with the general.
Although France denies taking sides in the conflict, French President Emmanuel Macron was the first Western leader to invite Gen Haftar to Europe for peace talks, and France launched air strikes in support of his forces in February 2019. They targeted Chadian opposition forces fighting against the LNA in the south.
How popular is Gen Haftar?
Like everything in Libya, it is difficult to tell, but voices in western Libya had spoken out in support of him.
Some there are fed up with the insecurity, weak governance and the corruption amongst powerful militias who control the capital and feel a strongman may be able to bring some authority to the lawless nation.
But others detest his links with Gaddafi when he took power, and his suspected subsequent links with US intelligence.
Is the Islamic State (IS) group a factor?
The turmoil that followed Gaddafi's fall allowed IS to gain a foothold in the country, taking control of Sirte.
But armed groups from the city of Misrata and the central region, which are at times loyal to the unity government, managed to expel the fighters from the city in August 2016 - with Western backing and US air strikes.
In January 2019, the city fell to Gen Haftar's forces.
IS, which was made up of defectors from local jihadist groups and foreign fighters, does not now control any city or town but still has a presence in various desert hideouts. It is now a diminished force, though it has been behind some attacks in the capital.
There are also suspicions that some of the jihadists, along with pro-Gaddafi forces, have moved out of Libya and and have escalated insurgencies in countries like Mali, Niger and Burkina Faso.
How is life being affected?
People do not feel safe and are constantly on the edge. Women especially feel more threatened when they go out - and kidnappings for ransom are a constant threat.
It is not easy to travel around the country as ID cards can identify which area people are from - and more than 200,000 Libyans are internally displaced and 1.3 million need humanitarian aid, according to the UN.
The cost of living is also high, there is a shortage of medicines, and there are power cuts in a country that was once regarded as economically successfully.