The Barbary macaque, Macaca sylvanus is a very adaptable primate species occupying a wide range of habitats in Morocco and Algeria. Several groups of this endangered macaque can be found in tourist sites, where they are affected by the presence of visitors providing food to them. We compare the activity budgets and the diet of semiprovisioned and wild-feeding groups of Barbary macaques in the central High Atlas Mountains of Morocco from February to August 2008. We used instantaneous scan sampling at 15-min intervals. The behaviors included in the activity budget were feeding, moving, foraging, resting, and aggressive display. Food items were grouped into seven categories. We found no differences between the two groups in the daily percentages of records attributed to feeding. The semiprovisioned group spent significantly more time engaged in resting and aggressive behavior, and foraged and moved significantly less than the wild-feeding group. There was no significant difference between the two groups in time spent eating leaves, fruits, or roots and bark. The semiprovisioned group, however, spent significantly less time per day feeding on herbs, seeds, and acorns than the wild-feeding group. Human food accounted for 26% of the daily feeding records for the semiprovisioned group and 1% for the wild-feeding group. Our findings agree with previous studies and indicate that in the tourist site, where food is highly clumped, macaques decreased foraging time yet showed higher levels of contest competition. Our results support the common claim that the diet of the Barbary macaque is highly flexible, differing among its varied habitats. Conservation efforts for the Barbary macaques should take into account the changes in behavior that human-modified environments may cause.