(Bloomberg) -- Libyan militias who’ve held sway in the capital for years will begin leaving in April after a deal was struck in the wake of recent deadly violence, according to an official in the OPEC nation’s internationally recognized government.

Under the agreement, seven groups will withdraw from Tripoli after the holy month of Ramadan, Interior Minister Imad Trabelsi said Wednesday in a briefing. Those would include an organization that’s the government’s strongest backer, leaving security matters solely in the hands of city police officers, criminal investigators and the emergency services, he said.

Militias have been the main powerbrokers in the North African nation ever since the NATO-backed revolt that overthrew long-time ruler Moammar Al Qaddafi in 2011 and it’s unclear if the deal will pan out. Successive Libyan governments have failed to rein in the heavily armed groups, which sporadically clash with each other, adding to the dysfunction in a country that’s home to the continent’s largest proven oil reserves.

After a United Nations-backed peace deal and plan for 2021 elections faltered, Libya is again divided between an administration in Tripoli and a rival parliament in the east. The militia agreement came after a Feb. 17 outbreak of violence in Tripoli in which at least 10 people were killed, according to the UN mission in Libya.

©2024 Bloomberg L.P.