Despite considerable inter-and intraindividual variation in fruit and seed size in many plant species, researchers have given little attention to the relevance of the traits for primate fruit choice within a food plant species and its implications for tree regeneration. We studied feeding behavior and selectivity of olive baboons (Papio anubis) in the African locust bean (Parkia biglobosa, Mimosaceae), via direct observations of habituated groups and indirect evidence from leftovers of pods after feeding events. Olive baboons acted as both seed predators and dispersers for Parkia biglobosa. They fed on and destroyed unripe seeds, and swallowed intact ripe seeds when consuming mature fruit pulp. Predation rate was high, and only 10% of the seeds were dispersed. Predation and dispersal of seeds is linked to seed number and size. Digestible unripe seeds accounted for 10% of the unripe fruit mass, while indigestible ripe seeds made up 28% of the mature fruit mass. With these constraints, olive baboons increased food gain per fruit by selecting unripe pods containing a high number of large and heavy seeds. Consequently, only pods with fewer and smaller seeds remained for maturation. Thereafter, baboons fed on mature pods containing the smallest seeds, and exploited pods with more seeds to a greater extent than those with fewer seeds. Thus, fruits with small seeds and an intermediate seed number contributed the most to dispersal by baboons.