Libya, which has seen more than a week of deadly clashes between rival militias around Tripoli, fell into chaos with the ouster of strongman Muammar Gaddafi in October 2011.
Two rival authorities and a multitude of militias are vying for control of the oil-rich country.
The capital Tripoli is the seat of the internationally backed Government of National Accord (GNA) led by Fayez al-Sarraj.
A parallel government operates out of the country's east, backed by the self-styled Libyan National Army of military strongman Khalifa Haftar.
Here is a timeline of its descent into chaos:
Triggered by uprisings in Tunisia and Egypt, demonstrations erupt in Libya in February 2011.
A coalition led by Washington, Paris and London lends its backing.
Gaddafi, who has ruled for 42 years, flees the capital. He is killed on October 20, 2011 during a battle for his hometown Sirte, east of Tripoli.
Three days later, the rebel National Transitional Council (NTC) declares Libya's "total liberation".
In August 2012 it hands power to the transitional General National Congress.
US ambassador Chris Stevens and three American staff are killed in a September 11, 2012 attack on their consulate in Libya's second city Benghazi.
An Al-Qaeda-linked jihadist group is blamed.
A car bomb in April 2013 targets France's embassy in Tripoli, wounding two French guards.
Most foreign delegations withdraw from the country.
Dissident general Haftar, backed by Egypt and the United Arab Emirates, launches an offensive in May 2014 against jihadist groups in Benghazi.
Several military officers from the east join his Libyan National Army.
In June, following legislative elections, the General National Congress is replaced by a parliament dominated by anti-Islamists.
In August, after weeks of deadly clashes, Islamist-led militias grouped under the "Fajr Libya" (Libya Dawn) banner storm Tripoli and set up a "national salvation" government.
The government of Abdullah al-Thani and the parliament elected in June take refuge in eastern Libya.
The country finds itself with two governments and two parliaments.
On December 17, 2015, after months of negotiations, accords signed under UN supervision in Morocco designate a UN-backed Government of National Accord (GNA).
In March 2016 GNA prime minister Sarraj arrives in Tripoli to set up the new government.
In January 2018, fighting at Tripoli's only working international airport kills at least 20 people after a militia attack.
The same month nearly 40 people are killed after two car bombings in Benghazi.
On May 2 two Islamic State suicide attackers kill 14 people at Libya's electoral commission in Tripoli.
On May 29 four senior Libyan leaders, including Sarraj and Haftar, commit at a Paris peace conference to hold elections on December 10.
But Libya remains in a state of chaos.
On June 14 a militia attacks two northeastern oil sites under Haftar's control and through which oil is piped abroad.
On June 25 Haftar's forces announce their "full control" of Libya's oil crescent after driving out the rival militia.
Three days later Haftar announces the "liberation" from radical Islamists of Derna, the only city in the eastern region beyond his control.
On August 27 heavy clashes break out between rival militias on the outskirts of Tripoli, killing dozens over the following days.
The capital and its surroundings are put under a state of emergency.