To understand how food resource use and partitioning by closely related species allows local coexistence, it is key to determine whether a species’ diet reflects food availability or food preferences; the latter can be rooted in functional traits and/or phylogenetic history. Here, we analysed the diets, seed selection and seed preferences of three closely related harvester ants: Messor barbarus, M. bouvieri, and M. capitatus. Sympatric within a Mediterranean shrubland, these species differ in foraging behaviour and worker polymorphism. For two years, we studied the ants’ diets and seed selection patterns as well as the local availability of seeds. Additionally, we performed a seed choice experiment using a paired comparison design, offering the ants seeds from eight native plant species. The three ant species had the same general diet, which was primarily granivorous. Although they all consumed a wide variety of seeds, they mostly selected seeds from a small subset of plant species. Despite their morphological and behavioural differences, the ants displayed similar seed preferences that were highly consistent with their diets and seed selection patterns. Our results support the idea that the trophic ecology of these three harvester ants is driven more by phylogeny, in the form of conserved seed preferences, than by functional traits. Seed diversity and abundance were high near the ants’ nests, suggesting that seed availability is not limiting and could in fact favour local species coexistence.