TRIPOLI, Libya -- Clashes involving soldiers, armed civilians and members of a militant Islamic group in Libya's eastern city of Benghazi left nine dead early on Monday, the government said. It was the latest confrontation between residents of Libya's larger cities and the militias based in their midst.

The fighting started before dawn between armed citizens and members of Ansar al-Shariah, a hard-line group suspected to have been behind the Sept. 11, 2012, attack on the U.S. Consulate in the eastern city, which left the U.S. Ambassador dead along with three other Americans.

Despite being officially banned, the Ansar al-Shariah continues to maintain a presence in Benghazi.

The violence prompted the army's special forces to step in to quell the violence, said security officials. They spoke on condition of anonymity in line with regulations.

Sounds of explosions and gunfire echoed across much of the city, but mainly in the Raas Obeida district and surrounding areas. Clouds of black smoke hung over Benghazi as ambulances rushed the wounded to hospital and pickup trucks with anti-aircraft guns mounted on their backs fired as they dash from one street to another.

Classes were suspended at the city's schools and local university, and most Benghazi residents stayed home because of the fighting. Mohammed Abu Sneina of Benghazi's local council warned that harsh measures would be taken against anyone who disturbs peace and security.

Libya has been roiled by unrest since the ouster in 2011 of longtime dictator Moammar Gadhafi. Armed groups that fought Gadhafi's army in 2011 have turned themselves into militias that exploited the weakness of the weak central government in Tripoli and now control the streets and operate independently of the police and the military.

Earlier this month, at least 40 people were killed when residents of the capital, Tripoli, took to the streets to protest the presence of militias in the city. The uprising forced several militias to leave the city and head back to their hometowns.

The frustrations over the militias felt by many Libyans encouraged the government to start a major push to gain full control the vast, oil-rich North African nation.