Libya’s president has ordered the disbandment of “illegitimate” militias, a move designed to assert state authority amid violence by armed groups including an assault on the U.S. Consulate in the eastern city of Benghazi that killed the U.S. ambassador.

In the late Saturday news conference, President Mohammed el-Megaref said a joint operations room in Benghazi will coordinate between the various authorized militia brigades and the army. He said others operating outside the “legitimacy of the state” are to be disbanded.

The decision came amid growing public anger at armed factions and Islamic extremists, resulting in the storming of some of their compounds by protesters.

But in the absence of strong security forces, the government relies on some militias to keep order.

Ambassador Christopher Stevens was killed earlier this month in an attack on the consulate, along with foreign service officer Sean Smith and former Navy SEALs Tyrone S. Woods and Glen A. Doherty, who provided security at the embassy.