Reports say dozens were injured in the violence, which erupted Saturday after protesters stormed a base belonging to Libya Shield, a grouping of pro-government militias tasked with maintaining security.
The protesters were demanding that militias leave their camp and submit to the full authority of Libya's security forces.
Mohamed Belied, who is director at the city's al-Jala hospital, said early Sunday the deaths were caused by gunshots and explosive fragments. He did not say how many casualties were protesters and how many militiamen.
Libya is going through a rocky transition after its bloody 2011 civil war.
The central government remains weak and has been challenged by powerful militia groups, initially formed of ex-rebels who fought dictator Moammar Gadhafi's forces during the war.
Successive governments have relied on them to maintain security, but they have also blamed militia groups for ongoing violence as the government has struggled to enforce its authority over them.
Security remains elusive in the country, still awash with weapons from the war and prone to violent escalations over private and political affairs.