Tripoli, Libya (CNN) -- Libyan militias surrendered their Tripoli bases to the military on Thursday, nearly a week after growing public anger over the presence of armed groups in the capital sparked deadly clashes.
In a series of ceremonies across the coastal city, militias from Tripoli as well as smaller towns such as Zintan handed over their bases to the authorities, including the Ministry of Defence and Libyan air force. These included the Mitiga airbase, as well as the Islamic Call Center.
Public anger has been growing over the armed groups' refusal to disarm in the two years since they toppled the North African country's longtime leader, Moammar Gadhafi.
Last Friday, Tripoli residents marched on the headquarters of militias from the city of Misrata. The militia opened fire on unarmed demonstrators, unleashing heavy clashes that left 47 people dead and more than 500 injured in the worst violence in the city in two years.
Misrata militias withdrew from Tripoli earlier this week, but it was not immediately clear where the militias that handed over their bases on Thursday would go. They include a number of powerful and heavily armed groups. Other groups remain in Tripoli.
Government officials attending the ceremonies nonetheless praised the handover as a major step toward building the Libyan state and its security forces.
During a press conference at one of the ceremonies, Prime Minister Ali Zeidan lashed out at a reporter who asked whether the government had guarantees the handovers were real, and not ceremonial.
"We are not joking here, we are not in a theater to be acting" Zeidan said. "We are serious about this. ... We have a duty to fulfill and we will fulfill it God willing. The weapons that were in the hands of these groups was the security threat and now this threat has disappeared".
While many Libyans welcomed the move toward disarming militias, the real impact on the ground has yet to be seen.
In a country still awash with weapons, Libya's fledgling state security forces remain outgunned by former rebel fighters. Zeidan's government is struggling to assert its authority.
Zeidan was himself briefly abducted by militiamen last month.