Clashes broke out in Tripoli on Wednesday when armed men tried to free comrades who had been seized by ex-rebels, and an army officer was killed in Benghazi, Libyan officials told AFP.
The fighting occured in the Abu Slim area near the centre of Tripoli, according to a security official who added that gunfire broke out in several other areas of the city.
This recent spat of violence highlights the insecurity still rocking Libya two years after dictator Muammar Gaddafi was ousted.
"It's a war here," Meftah, a resident of the area, told AFP.
Rebels first entered Tripoli in August 2011, when their presence helped force Gaddafi loyalists out of the cpaital after a mass uprising against his regime broke out.
Despite the fall of the Gaddafi government, many of the rebel groups have remained in the capital, occupying former military bases.
Earlier this week, a group of armed men from Zintan, where many of the rebels are from, launched an attack against the headquarters of the petrol installations guard before another group of rebels forcibly stopped them.
Five people died on Tuesday after clashes in the Tripoli suburb of Salaheddin killed five, Libyan officials told AFP.
In the eastern city of Benghazi an army officer died after a bomb rigged to his vehicle expoloded, medical sources said.
The death of the soldier comes one day after six soliders were killed at a checkpoint in the south of Sirte.