Under the agreement, the militants also agreed not to allow al-Qaeda or any other extremist group to operate in the areas they control.