The violence, which spread to several Tripoli district, follows months of rising tensions between two administrations vying for control of the North African country and its vast oil resources.
Fighting between backers of rival governments have killed at least 12 people and damaged six hospitals in Libya's capital, sparking fears that a political crisis could spiral into a major new conflict.
Small arms fire and explosions rocked several districts of Tripoli overnight and into Saturday, when smoke could be seen rising from damaged buildings.
Early on Saturday evening, the health ministry in Tripoli gave a preliminary toll of 12 dead and 87 wounded from the fighting.
Six hospitals were hit and ambulances were unable to reach areas affected by the clashes, the ministry had said earlier, condemning "war crimes".
The two rival administrations exchanged blame as videos posted online showed burned-out cars and buildings riddled with bullet holes, as well as a mosque on fire.
News agency Lana said actor Mustafa Baraka had been killed in one of the neighbourhoods hit by fighting, sparking anger and mourning on social media. The comedian was known for his social media videos mocking militias and corruption.
The violence follows months of rising tensions between two administrations vying for control of the North African country and its vast oil resources.
It is latest configuration in a complex and often violent power struggle since the 2011 overthrow of the late Libyan leader Muammar Gaddafi.
The UN's Libya mission called for "an immediate cessation of hostilities", citing "ongoing armed clashes including indiscriminate medium and heavy shelling in civilian-populated neighbourhoods" that it said had damaged hospitals.
The US embassy in Libya said it was "very concerned" about the clashes.
The Government of National Unity (GNU) of Abdulhamid Dbeibah said fighting had broken out after negotiations to avoid bloodshed in the western city collapsed.
Dbeibah's government, formed as part of a United Nations-led peace process following a previous round of violence, is challenged by a rival government led by former interior minister Fathi Bashagha.
Bashagha, who is backed by Libya's parliament and eastern-based warlord Khalifa Haftar, says the GNU's mandate has expired.
But he has so far been unable to take office in Tripoli, as Dbeibah has insisted on only handing power to an elected government.
Dbeibah's government accused Bashagha of "carrying out his threats" to seize Tripoli by force.
Dbeibah's GNU said negotiations had been underway to "hold elections at the end of the year to resolve the political crisis", but that Bashagha had "walked out at the last moment".
Bashagha denied such talks had taken place, and accused Dbeibah's "illegitimate" administration of "clinging to power".
Bashagha was appointed in February by the parliament, which was elected in 2014 and is based in the eastern city of Tobruk, but he has been unable to impose his authority in Tripoli.
Initially ruling out the use of violence, the former interior minister has since hinted that he could resort to force.
Last week, he called on "Libyan men of honour" to drop their support for Dbeibah's "obsolete and illegitimate" administration.
Last month, clashes between rival groups in Tripoli left 16 people dead, including a child.
It was the deadliest violence to hit the Libyan capital since warlord Haftar's attempt to seize it by force in 2019 and 2020.