People are nicer to each other when they think someone is watching, many psychology studies have shown—especially if they believe that someone has the power to punish them for transgressions even after they’re dead. That’s why some scientists think that belief in the high gods of moralizing religions, such as Islam and Christianity, helped people cooperate with each other and encouraged societies to grow. An innovative study of 96 societies in the Pacific now suggests that a culture might not need to believe in omniscient, moral gods in order to reap the benefits of religion in the form of political complexity. All they need is the threat of supernatural punishment, even if the deities in question don’t care about morality and act on personal whims, the new work concludes.

People raised in Western cultures find the idea of moralizing high gods—so-called big gods such as the Abrahamic god of Judaism, Christianity, and Islam—“really intuitive, and think that they are a common feature of religion, whereas really they’re not,” says Joseph Watts, a doctoral student in cultural evolution at the University of Auckland in New Zealand. Gods in small-scale societies are “a lot more like humans,” he says. Think of the ancient Greek gods, with their romantic entanglements, material concerns, and arbitrary biases, for example.

According to one leading theory of the evolution of religion, small-scale societies don’t have big gods because there’s no community benefit to having deities concerned with moral behavior. In those cultures, there’s no anonymity. Your neighbors, friends, and family are always watching and judging, and the danger of a damaged reputation is enough to keep you on the straight and narrow. As societies get larger, there are more opportunities to break bad—steal from complete strangers, for example—and fewer and fewer direct social consequences for doing so. But if everyone took advantage of those newfound opportunities to break the rules, big societies would collapse before they even got started.

That’s where the big gods come in. Gods that are omniscient, concerned with people’s moral behavior, and capable of punishing transgressions in life or after death put believers on their best behavior and make it easier for large groups of strangers to live and work cooperatively. Thus, the thinking goes, a shared belief in moralizing high gods can help a society grow larger and more complex by encouraging cooperation and other prosocial behavior.

Of course, it’s difficult to prove for sure how religions evolved without going back in time and seeing the process in action. But the big gods idea does make at least one testable prediction: that moralizing religions should appear before complex societies. To test which came first, a team of scientists led by Watts analyzed data about religion and political complexity from Austronesia, a group of related cultures indigenous to islands throughout Southeast Asia and the South Pacific. They collected the earliest known ethnographic data about 96 cultures, ranging from islands in the Philippines and Indonesia to Easter Island. They designated each culture as either low complexity (no political leadership or simple chiefdoms) or high complexity (anything from complex chiefdoms to full-blown states), and then examined their religious beliefs. Moralizing high gods were defined as beings that created the cosmos, were active in human affairs, and were invested in morality. Supernatural punishment was a bit more flexible: any being or process that monitored and punished behavior deemed selfish in the community. The researchers also borrowed statistical techniques from genetic evolution to reconstruct family trees of Austronesian cultures, which gave them an idea of when the various religious and political traits likely arose in different societies.

Full-blown moralizing high gods were rare in Austronesia; out of the 96 cultures studied, Watts’s team identified only six with big gods, and the family trees suggested that these beliefs were more likely to arise after societies became politically complex—contradicting the idea that moralizing high gods are necessary for that kind of social development, Watts says. Belief in some kind of supernatural punishment—perhaps by ancestor spirits or nature deities—was more widespread. Thirty-seven cultures believed that deities could punish selfish behavior, such as forgoing a sacrifice or disobeying a taboo, the team reports online today in the Proceedings of the Royal Society B. Even though these punishing deities’ concerns were not necessarily moral, the statistics suggested that belief in them was more likely to predate political complexity in a culture, suggesting that it is threat of supernatural punishment—not necessarily faith in moralizing gods—that helps societies grow larger.

“I think there has been too much emphasis in the field of evolutionary religious studies on these kind of moralizing high gods,” Watts says. In order to understand how religion functioned in the past, “we really need to look at different kinds of supernatural agents and different kinds of religious features.”

When it comes to that idea, Watts has a somewhat surprising supporter: Ara Norenzayan, a psychologist who studies the evolution of religion at the University of British Columbia (UBC), Vancouver, in Canada. He’s the one who proposed the link between moralizing religions and political complexity in his 2013 book Big Gods: How Religion Transformed Cooperation and Conflict, and since then his name has become practically synonymous with the theory. But, Norenzayan notes, “there’s a lot more to religion than moralizing gods.” All-powerful supernatural creators like the Abrahamic god are “at the extreme end of the spectrum” when it comes to beliefs that promote large-scale cooperation and social complexity. Certain rituals and beliefs like karma can also encourage prosocial behavior “without necessarily invoking big gods.”

Especially in small societies like the ones in Austronesia, “what you’d expect is actually a gradual ramping up in moral concern and supernatural surveillance among the smaller gods, which is what their data seem to suggest,” agrees Edward Slingerland, a historian at UBC who works with Norenzayan on the evolution of religion. The article “is a huge improvement” over past work on the evolution of religion “in terms of how they’re dealing scientifically with the cultural material,” Slingerland says. “It seems like they’ve done a really sophisticated and thorough job in trying to render this qualitative data into something quantitative.”