At least 15 members of the security forces were killed and 40 wounded in two days of clashes in the eastern Libyan city of Benghazi, a hospital source said on Saturday, as they try to consolidate gains made in February against Islamist militants.
On Friday, two Islamic State suicide bombers staged attacks near a cement factory in the west of the city where fighters are holding out, though only one of the bombs caused casualties, army spokesman Milad al-Zawie said.
Libya has been in crisis since the ousting of Muammar Gaddafi in 2011, with violence escalating in 2014.
Islamic State posted a message on social media saying dozens of soldiers had been killed by the bombers, but Zawie said just six soldiers were killed and 25 were wounded on Friday.
A Reuters reporter saw the bodies of at least five militants, including two suicide bombers, killed in the clashes.
Eastern military commander Khalifa Haftar launched his Operation Dignity campaign against Islamist militants and other opponents in Benghazi in May 2014 and that fighting has caused major damage to the city.
Nevertheless, the military has been unable to achieve its stated aim of securing control of Benghazi.
Haftar is allied to a government that moved to eastern Libya after a rival administration was installed by its armed supporters in Tripoli in 2014.
A UN-backed unity government arrived in the Libyan capital late last month where it is trying to establish itself. The West hopes it can end Libya's security crisis and political turmoil and unite some of its armed factions to take on Islamic State.