Remembering individual identities is part of our own everyday social life. Surprisingly, this ability has recently been shown in two social insects. While paper wasps recognize each other individually through their facial markings, the ant, Pachycondyla villosa, uses chemical cues. In both species, individual recognition is adaptive since it facilitates the maintenance of stable dominance hierarchies among individuals, and thus reduces the cost of conflict within these small societies. Here, we investigated individual recognition in Pachycondyla ants by quantifying the level of aggression between pairs of familiar or unfamiliar queens over time. We show that unrelated founding queens of P. villosa and Pachycondyla inversa store information on the individual identity of other queens and can retrieve it from memory after 24 h of separation. Thus, we have documented for the first time that long-term memory of individual identity is present and functional in ants. This novel finding represents an advance in our understanding of the mechanism determining the evolution of cooperation among unrelated individuals.