Libyan army chief of staff Youssef al-Mangoush has reportedly resigned after 30 people died in clashes between protesters and a militia in Benghazi.
The General National Congress accepted his resignation in a session on Sunday, sources at the assembly say.
The clashes erupted when protesters gathered outside the Libya Shield Brigade premises demanding it disband.
The government has struggled to tackle the presence of armed militias since Col Gaddafi's death in 2011.
The BBC's Rana Jawad says Mr Mangoush, who was due to be replaced soon anyway, was seen as ineffective and to blame for much of the country's problems with the militias.
The army chief submitted his resignation in a closed door session of the GNC, a member of congress told the BBC.
It comes as part of a wider decree, according to the same source, which also includes the appointment of a judge to investigate and break up the militias, as well as declare three days of mourning.
A doctor at Benghazi's main hospital says that some of the deaths were caused by gunshot wounds to the chest and that there were six cases of amputations among the dozens of people injured.
Following Saturday's violence, the Libyan army said it would take control of all bases run by the Libya Shield Brigade in Benghazi.
The main headquarters, where the clashes took place, is already in the hands of a special forces unit in the city, an army spokesman said.
While it is not clear what the handover means in the long-term, it is clear that officials have not used the word "dismantle" - a key demand of the protesters - our correspondent says.
The government has also promised to follow investigations into the incident closely and a GNC statement said they were saddened by the events.
However, our correspondent notes what they did not do is issue any direct criticism towards the Libya Shield Brigade, which will be seen by many as the authorities tip-toeing around the issue of militias and semi-autonomous brigades.
It also illustrates the weakness of the government in facing the matter head on, she adds.
Tens of thousands took to the streets of Benghazi last year to eject a number of armed groups that they blamed for the continuing lawlessness in the city.
Growing resentment towards armed militias was compounded after militiamen laid siege to various government ministries in Tripoli in April.