In the Central High Atlas, the Barbary macaque occurs in relatively small and fragmented areas restricted to the main valleys at altitudes of 700–2,400 m. In a 2013 study, researchers reported that they found Barbary macaques in relatively small and fragmented habitats in 10 sites, and that the species no longer occurred in four localities. This could be attributed to habitat degradation, hunting activities, the impact of livestock grazing, and disturbance by people. As deforestation for agriculture and overgrazing continues, the remaining forest becomes increasingly fragmented. Consequently, the Barbary macaque is now restricted to small, fragmented relict habitats.