Libya, where rival authorities and numerous militias are vying for power, fell into chaos after the ouster of strongman Muammar Gaddafi in October 2011.
Gaddafi, who ruled Libya for 42 years, is killed on October 20, 2011, as he tries to flee his hometown Sirte.
Three days later, the former rebel National Transitional Council declares Libya's "total liberation" after a NATO-backed uprising that began in February.
In August 2012, the NTC hands over power to the transitional General National Congress elected a month earlier.
Rise of radical groups
US ambassador Chris Stevens and three other American staff are killed in a September 11, 2012 attack on their consulate in Libya's second city Benghazi. The jihadist group Ansar al-Sharia, linked to al-Qaeda, is accused of carrying out the attack.
A car bomb attack in April 2013 targets France's embassy in Tripoli, wounding two French guards.
Violence is widespread. Libya plunges further into chaos with foreign delegations pulling out of the country.
Military strongman Khalifa Haftar, backed by Egypt and the United Arab Emirates, launches an offensive in May 2014 against Islamist groups in Benghazi.
Several military officers, including members of the air force, join his paramilitary Libyan National Army.
In June 2014, following legislative elections, the General National Congress is replaced by a parliament dominated by anti-Islamists.
In August 2014, 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, the only ones recognised internationally, take refuge in eastern Libya.
The country finds itself with two governments and two parliaments.
IS profits from chaos
The Islamic State group claims its first attack in Libya in December 2014. The following June it seizes Sirte to the east of Tripoli, but is driven out of the coastal town in December 2016.
On December 17, 2015, after months of negotiations, accords signed under UN supervision in Skhirat, Morocco, designate a UN-backed Government of National Accord (GNA) as the "only legitimate government of Libya" in the eyes of the international community.
On December 23, the UN Security Council endorses the accord.
In March 2016 the GNA takes up office in Tripoli headed by prime minister Fayez al-Sarraj.
The GNA is opposed by the rival administration in the east of the country, backed by Haftar, and by the parliament elected in 2014.
In December 2017, despite the failure of attempts to amend the accord, the UN says the Skhirat accord is the only viable framework for ending Libya's political crisis.
On the GNA's second anniversary, Haftar says its mandate has run out after what he says is the expiry of the Skhirat accord.
The mayor of Libya's third-largest city Misrata is abducted a day later on December 18 and killed by unidentified assailants.
In January 2018 fighting at Tripoli's only working international airport kills at least 20 people after militiamen attack it a bid to free colleagues held at a jail there.
The same month at least 37 people are killed and scores are wounded after two car bombings outside a mosque frequented by jihadist opponents in Benghazi.
On May 2 suicide attackers kill at least 12 people at Libya's electoral commission in Tripoli.
IS claims responsibility.