The Health Ministry said in a statement hospitals and medical centres in the capital were shelled, and ambulance teams were barred from evacuating civilians, in acts that "amount to war crimes."
The municipal council of Tripoli blamed the ruling political class for the deteriorating situation in the capital, and urged the international community to "protect civilians in Libya."
The violence caused widespread panic among Tripoli residents. Footage circulated online showed houses, government facilities, and vehicles apparently damaged from the fighting. Other footage showed militia forces deploying and heavy fire being exchanged across the night sky.
The UN mission in Libya said the fighting involved "indiscriminate medium and heavy shelling in civilian-populated neighbourhoods" of Tripoli.
The mission called for an immediate ceasefire, and for all parties in Libya to "refrain from using any form of hate speech and incitement to violence."
The clashes pitted the Tripoli Revolutionaries' Brigade militia, led by Haitham Tajouri, against another militia allied with Abdel-Ghani al-Kikli, an infamous warlord known as "Gheniwa," according to local media. Later, more militias joined the fighting which spread to different areas in the capital.
Prime Minister Abdul Hamid Dbeibah's government, which is based in Tripoli, claimed the clashes broke out when one militia fired at another.
The fighting, however, is highly likely part of an ongoing power struggle between Dbeibah and his rival Prime Minister Fathy Bashagha who is operating from the coastal city of Sirte.
Both Dbeibah and Bashagha are backed by militias, and the latter was mobilising in recent weeks to try to enter Tripoli to dislodge his rival.
An attempt by Bashagha to install his government in Tripoli triggered clashes that ended with his withdrawal from the capital.
US Ambassador to Libya Richard Norland urged for de-escalation "before things get worse" and for Libyan parties to agree on an early date for elections.