Jihadist gunmen clashed on Monday with Libyan troops in Benghazi, killing 10 soldiers, as the Islamists tried to advance on an airport in the eastern city, the army said.
The fighting came as Libya's outgoing government said that armed militias were in control of the capital Tripoli, days after Islamists seized its international airport as the oil-rich North African nation further slipped into chaos.
In Benghazi, birthplace of the 2011 NATO-backed uprising that toppled and killed dictator Moamer Kadhafi, a spokesman for the army's special forces said the jihadist group Ansar al-Sharia took part in the clashes.
"Ten soldiers were killed and more than 10 were wounded when they pushed back combatants from the Shura of Benghazi Revolutionaries," said the spokesman, General Miloud al-Zawi.
Ansar al-Sharia, which Washington classifies as a "terrorist" organisation, is based in Benghazi and said to control 80 percent of Libya's second city.
Signup to our newsletter and follow us on Facebook and Twitter!
It is part of the Shura coalition of jihadist fighters who tried to advance on Benina, which is both a civilian airport and an air force base, Zawi said.
"The situation is now under control," said Zawi, adding that the army repelled the attack with help from the air force which bombarded a column of advancing jihadists.
In May a rogue general, Khalifa Haftar, launched an offensive dubbed "Operation Dignity" against radical Islamists in Benghazi, vowing to press his campaign until they are crushed.
On August 22, the Fajr Libya (Libya Dawn) mainly Islamist alliance seized Tripoli airport after weeks of fierce fighting with nationalist rivals.
And on Monday, the government said Tripoli was in the hands of armed militias.
"Ministry and state offices in Tripoli have been occupied by armed militias who are preventing government workers from entering and are threatening their superiors," a government statement said.