In social insects, the evolutionary stability of cooperation depends on the privileged relationships between individuals of the social group, which is facilitated by the recognition of relatives. Nestmate recognition is based on genetically determined cues and/or environmentally derived chemical components present on the cuticle of individuals. Here, we studied nestmate recognition in the ant Pheidole pallidula, a species where both single-queen (monogyne) and multiple-queen (polygyne) colonies co-occur in the same population. We combined geographical, genetic and chemical analyses to disentangle the factors influencing the level of intraspecific aggressiveness. We show that encounters between workers from neighbouring colonies (i.e., nests less than 5 m away) are on average less aggressive than those between workers from more distant colonies. Aggressive behaviour is associated with the level of genetic difference: workers from monogyne colonies are more aggressive than workers from polygyne colonies, and the intensity of aggressiveness is positively associated with the genetic distance between colonies. Since the genetic distance is correlated with the spatial distance between pairs of colonies, the lower level of aggression toward neighbours may result from their higher relatedness. In contrast, the analysis of overall cuticular hydrocarbon profiles shows that aggressive behaviour is associated neither with the chemical diversity of colonies, nor with the chemical distances between them. When considering methyl-branched alkanes only, however, chemical distances differed between monogyne and polygyne colonies and were significantly associated with aggressiveness. Altogether, these results show that the social structure of colonies and the genetic distances between colonies are two major factors influencing the intensity of agonistic behaviours in the ant P. pallidula.