The clashes sent tanks and convoys of armed militiamen streaming into the streets.
The sides are split between rival militias vying for control of the city: One has its origins in Tripoli, while the other side is led by forces originally from the western city of Misrata and has Islamist leanings.
Pictures posted on social media showed masked armed men on pick-up trucks in the streets in Tripoli.
Libya sank into lawlessness and divisions after the downfall of the longtime leader Moammar Gadhafi in 2011.