A nine-month offensive by Libyan strongman Khalifa Haftar to seize the capital from the UN-recognised government has left hundreds dead and dragged in regional and world powers.
As world powers push efforts for a ceasefire in the oil-rich country, with a peace conference in Berlin Sunday, here is an overview.
On April 4, 2019, Haftar orders his troops to advance on Tripoli, seat since 2016 of the Government of National Accord (GNA), which he claims is backed by “terrorist” groups.
The retired general supports a parallel administration based in the eastern city of Tobruk and his forces already control the country’s main southern oil fields.
His Libyan Arab Armed Forces (LAAF) briefly seize Tripoli’s defunct, battle-scarred international airport but are pushed back on April 5.
GNA forces announce a counter-offensive called “Volcano of Anger” on April 7.
Haftar’s aircraft strike Tripoli’s only functioning airport, Mitiga, on April 8.
On April 19, the White House says President Donald Trump recognises Haftar’s “significant role in fighting terrorism and securing Libya’s oil resources”.
On June 26 GNA forces retake the town of Gharyan, the LAAF’s main supply base southwest of the capital.
On July 2, an air strike hits a migrant detention centre in a Tripoli suburb. Fifty-three people are killed and 130 wounded. The GNA blames Haftar’s forces, which deny responsibility.
On November 5, The New York Times reports that Russia has sent some 200 mercenaries to support Haftar. Moscow denies the claim.
On the 15th, the United States urges Haftar to end his offensive.
On November 27 Turkey and the GNA sign a military and maritime deal which President Recep Tayyip Erdogan says could lead to joint exploration activities in a gas-rich area of the Mediterranean.
Other Mediterranean countries express alarm.
On December 10 a UN report accuses several countries of breaching a 2011 arms embargo by supplying the opposing camps.
While Turkey and Qatar support the GNA, Haftar is backed by Egypt, Jordan, Saudi Arabia and the United Arab Emirates among others.
On January 6, 2020, Haftar’s forces announce they have taken control of the strategic Mediterranean city of Sirte, about 450 kilometres (280 miles) east of Tripoli.
Two days later Erdogan says Turkey has sent 35 soldiers to Libya in a non-fighting capacity. He claims there are 2,500 Russian mercenaries supporting Haftar, which Moscow denies.
France, Greece, Egypt and Cyprus declare “null and void” agreements between Ankara and the GNA which give Turkey rights over a vast area of the eastern Mediterranean.
Amid warnings that Libya could become a “second Syria”, Turkey and Russia call for a ceasefire to start on January 12.
After a truce comes into effect, the two camps travel to Moscow for talks on January 13 on finalising the terms of a ceasefire agreement.
GNA chief Fayez al-Sarraj signs the deal but Haftar asks for more time to consider the accord and then abruptly leaves.
Germany pushes Haftar to abide by the ceasefire and announces days later that he and al-Sarraj will attend an international peace conference in Berlin on January 19.
Since the start of the offensive against Tripoli, more than 280 civilians and about 2,000 fighters have been killed and 146,000 Libyans displaced, according to the United Nations.