Group living is stressful for all mammals, and these stresses limit the size of their social groups. Humans live in very large groups by mammal standards, so how have they solved this problem? I use homicide rates as an index of within-community stress for humans living in small-scale ethnographic societies, and show that the frequency of homicide increases linearly with living-group size in hunter–gatherers. This is not, however, the case for cultivators living in permanent settlements, where there appears to be a ‘glass ceiling’ below which homicide rates oscillate. This glass ceiling correlates with the adoption of social institutions that allow tensions to be managed. The results suggest (a) that the transition to a settled lifestyle in the Neolithic may have been more challenging than is usually assumed and (b) that the increases in settlement size that followed the first villages necessitated the introduction of a series of social institutions designed to manage within-community discord.