Eastern forces and troops loyal to the government in Tripoli fought on the outskirts of Libya's capital on Wednesday as the battle forced thousands of residents to flee their homes.
The Libyan National Army (LNA) forces of eastern commander Khalifa Haftar had taken up positions in the suburbs about 11 km (7 miles) south of the centre, with steel containers and pickups with mounted machine-guns blocking their way into the city.
Residents reported LNA planes buzzing Tripoli and the sound of clashes in outskirts of the city.
Haftar's forces briefly took the former international airport earlier in the week, but Serraj's fighters won that back and the LNA was entrenched further south, witnesses said.
The United Nations said that at least 4,500 Tripoli residents had been displaced, most moving away from conflict areas to safer districts of the city. But many more were trapped, it said.
The LNA forces moved out of their stronghold in east Libya to take the sparsely-populated but oil-rich south earlier this year, before heading a week ago towards Tripoli, where the internationally-recognised government of Prime Minister Fayez al-Serraj sits.
Libya has been split into rival eastern and western administrations since the 2011 topping of former strongman Muammar Gaddafi. The United Nations wants to bring both sides together to plan an election and way out of the chaos.
The United Nations' humanitarian agency the OCHA said it was extremely concerned about the "disproportionate and indiscriminate use" of explosive weapons in densely-populated areas. Half a million children were at risk, it added.
I just want to survive
As well as the humanitarian consequences, renewed conflict in Libya threatens to disrupt oil supplies, boost migration across the Mediterranean to Europe, scupper the U.N. peace plan, and encourage militants to exploit the chaos.
Islamic State killed three people in a remote desert town under LNA control two days ago.
In Tripoli, nearly 50 people have died, mainly fighters but also some civilians including two doctors, according to latest U.N. casualty estimates. The toll is expected to rise.
Several thousand migrants, detained after trying to use Libya as a staging-point for crossing the Mediterranean to Europe, have also been caught up in the crisis.
The U.N. refugee agency UNHCR said on Tuesday it had relocated more than 150 of them - from a total estimated to be at least 5,700 - from one detention centre in south Tripoli to a facility of its own in a safe zone.
The United Nations, United States, European Union and G7 bloc have appealed for a ceasefire, a return to the U.N. peace plan, and a halt to Haftar's push.
Opponents cast him as a would-be dictator in the mould of Gaddafi, though Haftar projects himself as a champion against Islamist extremism.
Normal life is just about continuing in Tripoli, though prices are rising and businesses are closing earlier than usual.
"I don't care who wins or loses, I just want to survive with my family," said a teacher in Tripoli, who hoped to get out.