Black smoke rose into the sky and explosions reverberated around the Abu Salim and Hadba districts, and a witness said a major road nearby had been blocked off with shipping containers.
Gunfire echoed across several other neighborhoods, only dying down towardsthe evening.
Tripoli is controlled by an array of armed groups which sporadically clash over territorial control or economic interests. Some groups have quasi-official status, but no government has succeeded in taming their power since the uprising that toppled Muammar Gaddafi five years ago.
The violence is the latest setback for the U.N.-backed Government of National Accord (GNA), which arrived in the capital in March with the acquiescence of some powerful armed factions but has struggled to assert its authority.
Late on Friday it issued a statement strongly condemning the clashes, calling for restraint, and saying it had instructed the Interior Ministry to take steps to protect public facilities and private property.
The GNA is part of Western efforts to end Libya's chaos and unite factions aligned with two rival governments that were set up in Tripoli and eastern Libya in 2014. But the GNA has faced resistance from power brokers in eastern Libya and more recently from figures associated with a previous government in Tripoli that it had tried to displace.
Tripoli residents have become increasingly critical of the GNA as its leaders have failed to resolve severe economic problems, restore public services and improve security.
"The clashes between militias in Tripoli haven't stopped and there's no sign of the GNA," one resident, Mohammed Salem, told Reuters on Friday. People in Tripoli had little idea about any political maneuvering behind the clashes, he said.
"What is going on in Tripoli is a war of power ... every militia badly wants to gain power because they know if they control the capital they rule," Salem said.