Eight people were killed and eight wounded when a rocket hit a residential district in the eastern Libyan city of Benghazi on Friday, officials said.
An army commander blamed Islamist fighters for the rocket strike. Fighting for control of the country's second-largest city has been going on for a year, part of a conflict between former rebel groups who helped topple Muammar Gaddafi in 2011 but now back two rival governments.
"The army has made much progress and they suffered big losses," said army commander Fadhal al-Hassi, referring to the Majlis al-Shura, an umbrella group of mostly Islamist factions. "We had been worried they would take revenge for that and indeed now they fired rockets."
Army forces backing the official government, based in the east since losing Tripoli to a rival faction, have expelled the Islamists from several districts but do not control the entire city.
To the east of Benghazi, Islamic State militants attacked a security checkpoint near Derna, an Islamist hotspot, a security official said. Two soldiers were killed and five wounded, he said.
Islamic State has exploited the security vacuum as the two governments fight each other, with neither side dominating the other. The militants have killed dozens of foreign Christians and attacked oil fields and a luxury hotel in Tripoli.
In Sirte, a central city seized by Islamic State, the militants expanded their presence by taking over an air base to the south of the city after forces loyal to the Tripoli government pulled out.
"Forces of the 166th brigade ... relocated so that so-called Daesh fighters captured Qurdabiya air base," said Mohamed El-Shami, a military spokesman in Tripoli, using a derogatory term for Islamic State.
He said the brigade had previously requested reinforcements from a Tripoli-based rival parliament which had not arrived.