To calm the situation after yesterday's clashes involving former rebels, the General National Congress announced the resignation of General Yusef al-Mangoush, who has been criticised for delays in forming a national army.
GNC vice president Jomaa Atiga also said the government was being given two weeks to submit a plan to dissolve armed groups linked to the defence and interior ministries and to integrate their members individually into the regular security forces.
The decision provides for the dissolution of "all illegitimate armed groups", "including by use of force", he said.
The GNC also declared three days of mourning for the victims of yesterday's violence in the eastern city of Benghazi.
Also Read
The clashes flared after dozens of demonstrators, some armed, tried to force the powerful "Shield of Libya" brigade from its barracks in Benghazi, an AFP correspondent reported.
They encircled the headquarters and called on regular security forces to step in, saying they wanted rid of armed militias in the city.
The official LANA news agency quoted a source at Al-Jala hospital in Benghazi -- cradle of the 2011 uprising that ousted Gaddafi -- as saying the fighting had killed at least 31 people and wounded 100 more.
The dead were buried today to cries of "the martyrs' blood was not spilled in vain", as several hundred mourners gathered in Al-Hawari cemetery near central Benghazi.
The funerals took place in a calm atmosphere, although several young men vowed to meet later to protest against the "massacre of civilians by militias".