Kin recognition, defined as the ability to differentiate genetically related from unrelated individuals, plays a key role in a range of biological processes, from mate choice to altruistic behaviours, but kin-based altruism may be overridden by competition for resources. We explored kin recognition in a gregarious parasitoid wasp, Goniozus legneri, in which adult female–female contests for hosts occur. Contest behaviour was less aggressive when competitors were more closely related and also when females had developed on the same host (in nature, broodmates will almost always be siblings). Goniozus legneri appears to be the only parasitoid species utilizing both genetically based (phenotype matching) and environmentally based (familiarity) mechanisms of phenotypic kin discrimination. While perceived resource value affects aggression in Goniozus, resource competition did not completely override kin recognition effects.