Distinguishing nest-mates from non-nest-mates underlies key animal behaviours, such as territoriality, altruism and the evolution of sociality. Despite its importance, there is very little empirical support for such a mechanism in nature. Here we provide data that the nest-mate recognition mechanism in an ant is based on a colony-specific Z9-alkene signature, proving that surface chemicals are indeed used in ant nest-mate recognition as was suggested 100 years ago. We investigated the cuticular hydrocarbon profiles of 10 Formica exsecta colonies that are composed almost entirely of a Z9-alkene and alkane component. Then we showed that worker aggression is only elicited by the Z9-alkene part. This was confirmed using synthetic Z9-alkene and alkane blends matched to the individual colony profiles of the two most different chemical colonies. In both colonies, only glass beads with 'nest-mate' alkene profiles received reduced aggression. Finally, changing the abundance of a single Z9-alkene on live ants was shown to significantly increase the aggression they received from nest-mates in all five colonies tested. Our data suggest that nest-mate discrimination in the social insects has evolved to rely upon highly sensitive responses to relatively few compounds.