For the United Nations, it was a chance to clip the wings of powerful armed groups who had held the levers of power in the Libyan capital for years.