Darwin first suggested this idea in his 1873 book The Decent of Man but it seems to be getting more attention now.
Because so many of the 200,000 years of human history were spent during our hunter-gatherer phase, before the invention of agriculture, less than 10,000 years ago, this long period in our evolutionary history shaped our social behaviour. Altruism may have evolved directly as a result of tribal warfare because personal sacrifice was the key that enabled one group to be victorious over another.
Since Darwin, intergroup hostilities have figured prominently in explanations of the evolution of human social behavior. Yet whether ancestral humans were largely “peaceful” or “warlike” remains controversial. I ask a more precise question: If more cooperative groups were more likely to prevail in conflicts with other groups, was the level of intergroup violence sufficient to influence the evolution of human social behavior? Using a model of the evolutionary impact of between-group competition and a new data set that combines archaeological evidence on causes of death during the Late Pleistocene and early Holocene with ethnographic and historical reports on hunter-gatherer populations, I find that the estimated level of mortality in intergroup conflicts would have had substantial effects, allowing the proliferation of group-beneficial behaviors that were quite costly to the individual altruist.
Source: Science Magazine