Libya's warlord Khalifa Haftar's Libyan National Army (LNA) announced it was withdrawing from Tripoli to ease conditions for residents at the end of Ramadan.
Haftar said his troops were pulling back from all of the front lines in Tripoli.
This comes after Libya's UN-backed Government of National Accord (GNA) wrestled control of Al-Watiya military air base from the LNA earlier this week, dealing a significant blow to Haftar's military.
Haftar planned to take Tripoli in a lightning operation in April 2019 and many of his forces' attacks have been launched from Al-Watiya, killing many civilians.
On 17 May, GNA officials said at least seven civilians in Tripoli were killed in renewed shelling which they blamed on eastern-based forces seeking to seize the capital.
The GNA also announced that it had regained control of two cities near the Tunisian border from Haftar's forces.
Haftar's militias have been fighting against the GNA for legitimacy and power in the oil-rich country.
Turkey – the GNA's main ally – threatened to step up its attacks against the LNA.
Supported by the UAE, Russia and Egypt, the LNA still holds all of eastern Libya and much of the south.