The habitat of the Barbary macaque is under threat from increased logging activity. Local farmers view the monkeys as pests, and engage in extermination of the species. Once common throughout northern Africa and southern Europe, only an estimated 12,000 to 21,000 Barbary macaques are left in Morocco and Algeria. Once, their distribution was much more extensive, reaching Tunisia and Libya. Their range is no longer continuous, with only isolated areas of range remaining. During the Pleistocene, this species inhabited the Mediterranean coasts and Europe, reaching Italy, Hungary, Spain, Portugal, and France, and as far north as Germany and the British Isles.