A group of agents must defend their individual income from an external threat by pooling their efforts against it. The winner of this confrontation is determined by a contest success function where members’ efforts may display different degrees of complementarity. Individual effort is costly and follows a convex isoelastic function. We investigate how the success of the group in the conflict and its members’ utilities vary with the degree of within-group inequality. We show that there is a natural relationship between the group’s probability of victory and the Atkinson index of inequality. If members’ efforts are complementary or the cost function convex enough, more egalitarianism within the group increases the likelihood of victory against the external threat. The opposite holds when members’ efforts are substitutes and the cost linear enough. Finally, we obtain conditions under which richer members of the group are willing to make transfers to poorer members in order to enhance their final payoff.