Libyan militiamen besieging the foreign and justice ministries in Tripoli have now withdrawn and handed control of the compounds back to the authorities, Justice Minister Salah al-Marghani said on Saturday.
"Those who were at the two ministries have handed over the two ministries to a committee formed by the government and the General National Congress and have now departed," Marghani told AFP.
Prime Minister Ali Zeidan had announced on Wednesday there would be a cabinet reshuffle "in the coming days," against the backdrop of the country's latest political crisis, sparked by former rebels besieging the two ministries.
Signup to our newsletter and follow us on Facebook and Twitter!
"There will no doubt be a ministerial reshuffle in the coming days," he told reporters.
Zeidan's announcement came days after the General National Congress adopted a law that would bar collaborators of ousted and slain dictator Moamer Kadhafi from holding government posts.
The gunmen surrounded the foreign ministry on April 28 and the justice ministry two days later to demand that the exclusion law finally be passed after repeated delays.
After the end of the conflict in Libya, the former rebels were hailed as heroes for their part in toppling Kadhafi.
Since then, they have formed militias with different ideologies and motivations. Today they stand accused of many of the country's ills, notably the instability that still plagues parts of the North African nation.