Participants included hunter-gatherers, horticulturalists, herders and farmers, and people living in modern economies who earned wages or ran businesses.
While beliefs were diverse and ranged from Christianity to Hinduism and Buddhism, the study found that overall, participants who rated their gods highly as all-knowing and concerned with moral behaviour allocated more money to people who believed in the same god.
This was the case even if their co-believers were strangers from another community, but wasn't true for those who shared beliefs in local spirits and deities not considered so "all-knowing" or concerned with moral behaviour.
"The relatively dramatic rise in human co-operation since the advent of agriculture isn't explained by genetic evolution," said Dr Atkinson, of the university's School of Psychology.
"It turns out that putting the fear of God into us may have had a lot to do with it."
These gods acted as a kind of social engineering, he said, so that people who believed in a morally-concerned god were more likely to follow the rules of the game and give money to their fellow believers over themselves and their village.
The research, the largest and most wide-ranging study of its type, finally bridges the relationship between spiritual beliefs and co-operativeness.
Writing in Nature, Oxford University scholar Dr Dominic Johnson described it as "the most explicit evidence yet that belief in supernatural punishment has been instrumental in boosting co-operation in human societies".
"A large part of the success of human civilisations may have lain in the hands of the gods, whether or not they are real."
The wrath of gods
• An international team of researchers scientifically surveyed nearly 600 people from communities across the globe on their religious attitudes.
• They found people who believe their god is more punitive and knowledgeable behave more honestly and generously towards others who share their beliefs.
• The research may finally explain the centuries-old puzzle concerning the link between religion and co-operation.