A Libyan militia leader whose detention sparked clashes that killed 55 people in the capital Tripoli this week has been released, a military official said Thursday.
Gun battles had raged on the streets of Tripoli from Monday night through Tuesday after 444 Brigade leader Mahmoud Hamza was apprehended by the rival Al-Radaa Force.
"Hamza was released on Wednesday night and returned to his headquarters south of Tripoli," an official at army headquarters in western Libya told AFP.
"He was released under a government-sponsored ceasefire agreement which also provides for the withdrawal of fighters from the front lines," said the official who spoke on condition of anonymity.
Videos circulated on social media on Wednesday night showed Hamza dressed in military fatigues and surrounded by his fighters at the Tekbali barracks south of the Libyan capital.
Fighting broke out in Tripoli after Hamza's detention on Monday, killing 55 people, wounding 146 and forcing the closure of the capital's only civilian airport -- the worst armed clashes seen in Libya for a year.
The two armed groups are among the myriad of militias that have vied for power in the North African country since the 2011 Nato-backed uprising that toppled and killed longtime dictator Muammar Gaddafi.
A period of relative stability had led the United Nations to express hope for delayed elections to be held this year.
Calm returned to Tripoli and the Mitiga airport reopened after the ceasefire agreement reached late Tuesday between Prime Minister Abdelhamid Dbeibah's government and a social council in the Al-Radaa stronghold of Soug el-Joumaa in the capital's southeast.
"The situation is stable, with police patrols having been deployed" in the areas that had seen fighting, allowing people to move around, the military official said.
Libya is split between Dbeibah's UN-backed government in the west and another in the east backed by military strongman Khalifa Haftar.