Sexually transmitted diseases may have influenced prehistoric humans to embrace monogamy, according to a new study from the University of Waterloo.

The study suggests large societies learned to frown on and punish promiscuity, because it increased the risk of contracting diseases that could cause infertility. The threat of disease also gave rise to social norms that encouraged people to stick with one sexual partner, the study suggests.

"Our social norms were shaped by our natural environment," study co-author Chris Bauch, of the University of Waterloo, said in a news release. "This research shows how events in natural systems, such as the spread of contagious disease, can strongly influence the development of social norms and in particular our group-oriented judgments."

Bauch, a mathematics professor based in Waterloo, Ont., developed the study with Richard McElreath of the Max Planck Institute for Evolutionary Anthropology. The two researchers used computer modelling to simulate the different effects of mating behaviours on human populations, based on demographics and the different ways in which disease spreads.

According to the simulation, sexually transmitted diseases were short-lived in polygamous populations of 30 or fewer sexually-mature individuals. In these groups, men tended to take multiple women as their sexual partners, and random factors cause the disease to die out in the population.

But in sexually promiscuous groups larger than 30 individuals, sexually transmitted diseases tended to significantly impact the population over the long-term.

However, larger groups that enforced monogamy tended to eventually outlive or outnumber polygynous groups over the long term, according to the simulation. These monogamous societies would punish individuals for taking multiple sexual partners, because of the danger it presented, the study suggests. Societies that punished polygamy also fared better than those where it was tolerated.

"(Sexually transmitted diseases) can impose enormous selective pressures on humans," the authors write in the study.

The study is published online and in the April edition of Nature Communications.