Clashes broke out in a district and a suburb of Libya's capital on Saturday, home to groups opposing an alternative government controlling Tripoli and parts of western Libya, residents said.
The North African country is in the midst of a conflict between two governments and parliaments allied to armed groups fighting for power and territory four years after the ousting of Muammar Gaddafi.
Gunfire and explosions could be heard since early morning in the central Fashloum district and the Tajoura suburb east of Tripoli, residents said. Shells hit several residential buildings but there were no immediate reports of casualties.
Libyan news website Ajwa Belad said the clashes in Fashloum started after an armed group attacked a checkpoint of an anti-drugs police force.
It also quoted a security spokesman reporting to a rival parliament based in Tripoli saying his forces had captured two military camps in Tajoura after clashes had erupted on Friday.
"The clashes killed two and wounded five from our forces," he said, adding clashes were now taking place near another camp.
Fashloum and Tajoura are home to groups opposing a rival government in charge of Tripoli since an allied faction called Libya Dawn seized it in August, setting up an alternative administration.
The internationally-recognized government, based in the east since losing Tripoli, has several times said it wanted to retake Tripoli militarily. Clashes involving groups backing either side have occurred west of Tripoli in recent weeks but not inside the city.
Both sides are allied to former rebel groups who helped oust Gaddafi in 2011 but now fight in loose alliances backing either side of the new conflict.
Both have attacked cities belonging to the other side with war planes in recent weeks, undermining talks brokered by the United Nations to form a national unity government.