The Neotropical myrmecophytic tree Cordia alliodora hosts symbiotic Azteca ants in most of its widespread range. The taxonomy of the genus Azteca is notoriously difficult, which has frequently obscured species identity in ecological studies. We used sequence data from one mitochondrial and four nuclear loci to infer phylogenetic relationships, patterns of geographic distribution, and timing of diversification for 182 colonies of five C. alliodora-dwelling Azteca species from Mexico to Colombia. All morphological species were recovered as monophyletic, but we identified at least five distinct genetic lineages within the most abundant and specialized species, Azteca pittieri. Mitochondrial and nuclear data were concordant at the species level, but not within species. Divergence time analyses estimated that C. alliodora-dwelling Azteca shared a common ancestor approximately 10–22 million years ago, prior to the proposed arrival of the host tree in Middle America. Diversification in A. pittieri occurred in the Pleistocene and was not correlated with geographic distance, which suggests limited historical gene flow among geographically restricted populations. This contrasts with the previously reported lack of phylogeographic structure at this spatial scale in the host tree. Climatic niches, and particularly precipitation-related variables, did not overlap between the sites occupied by northern and southern lineages of A. pittieri. Together, these results suggest that restricted gene flow among ant populations may facilitate local adaptation to environmental heterogeneity. Differences in population structure between the ants and their host trees may profoundly affect the evolutionary dynamics of this widespread ant–plant mutualism.