Libya's UN-backed Government of National Accord (GNA) has regained full control of Tripoli after recapturing the capital's airport.
Gen Khalifa Haftar's forces have been besieging the city since April 2019.
But intensified military support from Turkey helped government forces drive Gen Haftar's Russian-backed troops back from the frontlines.
A new diplomatic effort is under way to try to restart talks on a lasting ceasefire in the oil-rich nation.
The recapture of the international airport in Tripoli – long out of use – is the strongest symbolic victory for the Libyan government so far, reports the BBC's Arab affairs editor Sebastian Usher.
Libya has been torn by violence since long-time ruler Col Muammar Gaddafi was deposed and killed in 2011 by Nato-backed forces.
How important is the GNA's recapture of Tripoli?
By Rana Jawad, BBC News, Tripoli
Some of the biggest hurdles to resolving the conflict in Libya have been the involvement of a multitude of countries by proxy, the continued arms flow despite a long-standing UN embargo, and the belief that a military victory allows any warring side to consolidate power.
The internal power shift is often brief until the next battle rolls in.
Libya's short and protracted battles have come and gone over the years and no matter who claims victory at the end of each…