The Libyan government has regained control of its interior ministry from an armed group that had taken over the building  for a week, an official said Wednesday, as reported by AFP.
The group ordered staff to leave the building on July 2 and remained there for a number of days, closing the main entry to the compound with mounds of sand.
A member of the group had said they were occupying the building in protest over an armed force, known as the Supreme Security Committee, which says it's backed by the ministry.
The SSC is composed of militiamen – former rebel fighters from the 2011 war that ousted Muammar Gaddafi – who are often better armed and more powerful than the police.
"The government had formed a ministerial committee to solve the crisis and it succeeded in getting the ministry back last night," a ministry official said, as quoted by AFP.
"We don't know what agreement was reached but right now workers are checking the building and it is in good condition."
Armed groups made up of former rebel fighters from different parts of the North African country have grown in power and ambition since Gaddafi's ouster and the weak central government has struggled to impose its authority over them.
Libya, a major oil producer, remains awash with weapons after the 2011 Western-backed uprising. But the central government, whose own forces are too weak to maintain security, has found itself having to co-opt or license some of the most powerful militias to maintain even a semblance of order.
The government has said it is drawing up plans to disband militias but has not given details of how the authorities will tackle the bands of fighters.