It tested them with economic games, where the people allocated money between themselves, a person of the same religion who lived far away, and one from the same religion who lived locally.

During the games, those who believed their god was all-knowing and moralistic gave more money to those who believed in the same god -- even when those people were strangers.

But those who didn't think their deity was all-knowing, or if the deity wasn't considered to be concerned with moral behaviour, didn't give as much to their co-believers.

It wasn't motivation of a possible reward from the deity which made people give more, the authors found, but rather the fear of divine retribution.

It's been long wondered what drove human co-operation which enabled the expansion of societies. University of Oxford's Professor Dominic Johnson says the study offers solid evidence that it was the fear of angry gods spurring it on.

"Religion is arguably the most powerful mechanism that societies have found to bind people together in common purpose," he wrote in an accompanying News & Views article to the paper.

"A large part of the success of human civilizations may have lain in the hands of the gods, whether or not they are real."