"A violent clash has been taking place for several hours between our forces and an Ansar al-Sharia cell," Colonel Milud al-Zwei, spokesman for Libya's special forces, told AFP.
Fadia al-Barghathi, spokesman for the city's Al-Jala hospital, said three soldiers were killed and 10 others wounded, along with four civilians hurt by stray bullets.
Zwei said the fighting- the first of its kind between the army and the Salafist group- broke out after a special forces patrol near the group's headquarters came under attack.
The spokesman said fighting between the two sides spread to other districts of Benghazi, especially near a charity clinic run by Ansar al-Sharia in the Selmani area.
Also Read
Ansar Al-Sharia emerged after the 2011 fall of Moamer Kadhafi's regime, with its military wing composed of former rebel fighters.
Blamed for the murders of judges and members of the security forces in Benghazi, it is also suspected of responsibility for a September 2012 attack in which the US ambassador and three other Americans were killed.
It denies any involvement.