People who live in harsh or uncertain environments are more likely to believe in gods that enforce a moral code and other social characteristics, researchers have found.

A study from the National Evolutionary Synthesis Centre (NESCent) has suggested belief in these types of gods is more widespread among societies where there is less access to food and water as it is advantageous for survival.

Russell Gray, a professor at the University of Auckland said: "A lot of evolutionists have been busy trying to bang religion on the head. I think the challenge is to explain it."

Published in a forthcoming issue of the Proceedings of the National Academies of Science, researchers were looking to explore the evolution of human cultures.

Primary author Carlos Botero then decided to look at ethnographic data of societies that believe in moral gods. Findings showed their global distribution is similar to a map of cooperative breeding in birds – suggesting ecological factors might be involved.

"When researchers discuss the forces that shaped human history, there is considerable disagreement as to whether our behaviour is primarily determined by culture or by the environment," he said. "We wanted to throw away all preconceived notions regarding these processes and look at all the potential drivers together to see how different aspects of the human experience may have contributed to the behavioural patterns we see today."

geography of belief
Distribution of societies that believe in moralising gods (blue) and those that do not (red). Light gray shading indicates lower potential for plant growth with the darker areas signifying high potential. Carlos Botero

Findings showed a strong correlation between belief in moral gods and political complexity and animal husbandry. Research included data from 583 societies, including variables such as plant growth, temperature and precipitation.

Previously, religion has been explained as the result of cultural or environmental factors, but not both. The latest findings suggest there is a "medley" of variables that result in religion. Recent research has also found a connection between moral gods and group cooperation, but evidence has been difficult to establish.

"Although some aspects of religion appear maladaptive, the near universal prevalence of religion suggests that there's got to be some adaptive value and by looking at how these things vary ecologically, we get some insight," Gray said.

Botero added: "The goal became not just to look at the ecological variables, but to look at the whole thing. Once we accounted for as many other factors as we could, we wanted to see if we could still detect an environmental effect. The overall picture is that these beliefs are ultimately shaped by a combination of historical, ecological, and social factors."