When considering engaging in conflict to secure control of a resource, a group needs to predict the amount of post‐conflict leakage due to infiltration by members of losing groups. We use this insight to explain why conflict often takes place along ethnic lines, why some ethnic groups are more often in conflict than others (and some never are), and why the same groups are sometimes in conflict and sometimes at peace. In our theory ethnic markers help enforce group membership: in homogeneous societies members of the losing group can more easily pass themselves as members of the winning group, and this reduces the chances of conflict as an equilibrium outcome. We derive a number of implications of the model relating social, political, and economic indicators such as the incidence of conflict, the distance between ethnic groups, group sizes, income inequality, and expropriable resources. One of the insights is that the incidence of ethnic conflict is nonmonotonic in expropriable resources as a fraction of total resources, with a low incidence for either low or high values. We use the model’s predictions to interpret historical examples of conflict associated with skin pigmentation, body size, language, and religion.