© 2017, Springer Science+Business Media New York. Socioecological theory proposes that the flexibility in grouping patterns afforded by fission–fusion dynamics allows animals to cope with spatiotemporal variability in food abundance. We investigate the influence of fruit tree abundance and foraging environment heterogeneity on fission–fusion dynamics in a group of spider monkeys (Ateles geoffroyi) in the Yucatan peninsula, Mexico. We collected 1300 h of behavioral data and 23 samples of biweekly ecological data from August 2009 to July 2010. We measured fission–fusion dynamics through the temporal variation in the size and composition of subgroups, the spatial dispersion within and between subgroups, and the frequency of fissions and fusions. We measured habitat-wide food abundance of preferred species, including two that differ greatly in their relative abundance: Brosimum alicastrum (a hyperabundant resource) and Ficus spp. (a not so abundant resource but often represented by large trees). We evaluated the foraging environment heterogeneity through the variance in the number of trees with fruit between species. Our results show that, although habitat-wide food abundance is important, the availability of key resources strongly influences the spider monkeys’ fission–fusion dynamics. When there was a high abundance of fruit of Brosimum, subgroups tended to be more stable, smaller, and mixed sex, and their members remained close. In contrast, when Brosimum trees with fruit were scarce, females often formed large, more fluid and dispersed subgroups. Foraging environment heterogeneity had a positive effect on within-subgroup spatial dispersion and rates of fission and fusion. The complex relationships we have uncovered suggest that the flexibility afforded by fission–fusion dynamics is an adaptation to highly variable foraging environments.