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.
Mr Mangoush’s deputy, Salem al-Gnaidy, will stand in as acting army chief until a new one is chosen, Reuters news agency reports.
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 it was saddened by the events.
However, the Congress did not 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, our correspondent adds.
It also illustrates the weakness of the government in facing the matter head on, she says.
Tens of thousands of people took to the streets of Benghazi last year to eject a number of armed groups that they blamed for continuing lawlessness in the city.
This followed an attack on the US consulate in Benghazi that killed four people, including US ambassador Chris Stevens.
Some officials blamed the attack on some of the largest brigades in the city, saying they were operating under the ministry of defence, our correspondent says.
Growing resentment towards armed militias was compounded after militiamen laid siege to various government ministries in Tripoli in April.