Mali has been plagued by insurgencies fought by affiliates of al Qaeda and the Islamic State group.