Oil-rich Libya has been mired in chaos since dictator Moamer Kadhafi was ousted and killed in a popular uprising backed by a NATO air campaign a decade ago.
Its UN-recognised government is based in Tripoli, while eastern strongman Khalifa Haftar supports a parallel administration based in the east. A myriad of militias is also vying for control.
Here is a timeline of the Mediterranean country's descent into turmoil.
Encouraged by Arab Spring uprisings in Tunisia and Egypt, demonstrations erupt in Libya in February 2011.
A coalition led by Washington, Paris and London lends its backing to an armed revolt.
Kadhafi, in power for 42 years, flees the capital but is captured and killed on October 20.
Three days later, the rebel National Transitional Council (NTC) declares Libya "liberated".
In August 2012, the NTC hands over power to a transitional authority, the General National Congress (GNC).
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.
Haftar launches an offensive in May 2014 against jihadist groups in Benghazi.
Several military officers from the east join his self-styled Libyan National Army.
As nationalists and Islamists vie for power, legislative polls are held in June and a parliament is elected, dominated by anti-Islamists.
But Islamist-led militias contest the results and storm Tripoli in August, restoring the GNC to power.
The elected house, which has international recognition, takes refuge in the eastern city of Tobruk.
Thus, the country finds itself with two governments and two parliaments.
After months of negotiations and international pressure, lawmakers from the rival parliaments sign an accord in December 2015 to set up a Government of National Accord (GNA).
In March 2016, GNA chief Fayez al-Sarraj arrives in Tripoli to set up the new government, but Haftar's rival administration refuses to recognise its authority.
Haftar announces the "total liberation" of Benghazi from jihadists in July 2017, after more than three years of fighting.
He is backed by neighbouring Egypt and the United Arab Emirates, later also forming links with Russia.
In January 2019, Haftar launches an offensive into oil-rich southern Libya. His forces seize the region's capital, Sebha, and one of the country's main oil fields.
In April, Haftar orders his troops to advance on Tripoli.
Russia is reported to have sent mercenaries in November 2019 to help Haftar's forces.
A UN report in December accuses several countries of breaching a 2011 arms embargo by supplying both camps.
In January 2020, Turkey announces the deployment of troops to help the Tripoli government, opening the way to a series of battlefield breakthroughs for the GNA.
Government hits back
In early June, government forces say they have overrun Haftar's last western stronghold, Tarhuna, the launchpad of the abortive assault on Tripoli.
They start an operation to retake Sirte, a strategic crossroads between the east and west of the country.
In June 2020, Egyptian President Abdel Fattah al-Sisi threatens a "direct" intervention if the government forces advance on Sirte.
On October 23, the rival governments sign a "permanent" ceasefire agreement after five days of UN-hosted talks in Geneva.
The following month, both sides agree at UN-led talks to hold elections on December 24, 2021.
On February 5, Libyan delegates at UN-led talks in Switzerland chose Abdul Hamid Dbeibah as prime minister of a transitional unity government, along with a three-member presidency council, to steer the country through to the elections.