An index of ethnic segregation conveys the extent of spatial mixing of ethnic groups, whereas an index of ethnic polarization and similar diversity measures show the overall balance between the groups. We present a game-theoretic model of conflict in which local success of one ethnic group encourages attacks by its co-ethnics in neighboring areas. Conditional on conflict breaking out, we find that for highly ethnically polarized societies, increasing ethnic segregation decreases the incidence and intensity of conflict. In contrast, in societies with low ethnic polarization, increasing segregation increases conflict. This is because segregation and polarization jointly determine the spread of conflict, an important channel that has been neglected previously. We find strong empirical support for model predictions in two very different conflicts: Hindu–Muslim riots in the 1980s and 1990s in India and the Bosnian Civil War from 1992 to 1995.