Around 19 people have been killed and 80 wounded in heavy clashes between Libyan soldiers and Islamist fighters in the eastern city of Benghazi in the past three days, medics said on Saturday.
Forces loyal to Libya's internationally recognised government have been fighting Islamist groups in the country's second-largest city for over a year, part of a wider struggle since Muammar Gaddafi was overthrown and killed in 2011.
Army forces backed by armed residents have regained some of the territory in Benghazi lost last year, but fighters of the Islamist Majlis al-Shura are still present in several districts and the central port area.
There have been heavy clashes for three days in the Lithi district since Islamist fighters holed up there attacked soldiers blocking the main streets into the district, army officials say.
"Special forces, supporting units and youth from the area have stopped a major assault," army special forces commander Wanis Bukhamada told Reuters. "These are the most violent clashes since fighting started. We still control the main junctions (into Lithi) but have lost soldiers and volunteers during this battle."
He accused Islamic State militants of being behind the assault. The group, which has seized large parts of Syria and Iraq, has built a presence in Benghazi and other parts of lawless Libya.
The Benghazi fighting highlights the chaos in Libya, where armed groups back two governments vying for control. The official prime minister has been based in the east since the capital, Tripoli, was seized by a rival group which set up its own government.
Both sides command loose coalitions of former anti-Gaddafi rebels. After Gaddafi's ouster, the various factions split along political, regional and tribal lines.
Islamic State has exploited the chaos by taking over several towns, executing foreigners and launching attacks against embassies in Tripoli.