Forces loyal to Libya's UN-backed unity government overran the headquarters of a rival militia on Wednesday as artillery exchanges rocked the capital for a third day, a security source said.
Libya has experienced years of violence and lawlessness since the NATO-backed ouster of longtime dictator Muammer Gadhafi in 2011, with rival parliaments and governments trading barbs and militias fighting over territory and the country's vast oil wealth.
Militia loyal to former prime minister Khalifa Ghweil, whose administration was replaced by the UN-backed Government of National Accord last year, have stepped up a campaign of defiance against its authority.
But overnight, government forces launched an assault on the militia's headquarters in the Guest Palace, a complex of luxury villas in the city centre, and overran it after heavy fighting.
"It's over. Ghweil's forces have pulled out and GNA forces have taken control of the area," a witness told AFP.
A security source confirmed the militia's withdrawal. He had no immediate word on any casualties.
It was the third straight day of fighting between government forces and the militia, who are mainly drawn from Ghweil's hometown, third city Misrata.
The sound of gunfire and explosions was heard from multiple neighbourhoods of the capital.
A rocket hit the Al-Khadhra Hospital without causing any casualties, a medic said.
Overnight, gunmen stormed the headquarters of Al-Nabaa television, a privately owned channel known for its Islamist leanings, witnesses said.
The channel remained off the air on Wednesday.
The fighting brought life in the capital to a standstill with schools and shops closed.
It came despite an appeal from UN Libya envoy Martin Kobler on Tuesday for an "immediate ceasefire".
"Civilians at grave risk in ongoing clashes," Kobler said on Twitter.
The clashes erupted in the neighbourhoods of Hay al-Andalus and Gargaresh on Monday evening, prompting the government to deploy tanks.
They came as heavy fighting rocked the east of Libya where forces loyal to military strongman Khalifa Haftar announced their recapture of two key oil ports on Tuesday.
Haftar's forces, which do not recognise the UN-backed government, mounted a day-long assault by land, sea and air to retake the ports of Ras Lanuf and Al-Sidra, after they were seized by a rival, Islamist-led force earlier this month.