“Love and marriage go together like a horse and carriage” sang Frank Sinatra in 1955.

However, according to new research published in the journal Nature Communications, monogamous relationships developed for a markedly less romantic reason – the need to avoid sexually transmitted infections (STIs).

Academics used mathematical computer modelling techniques to understand how different social mating behaviours evolved in early human societies.

In early hunter-gatherer groups, a few males monopolised mating with a larger number of women. Within smaller groups, sexually transmitted diseases tended to be short-lived with no significant effect.

But humans turned to agriculture and the size of communities grew, the research found the prevalence of STIs would have increased among polygamist networks.

Without modern medicines, the rates of infertility from syphilis, chlamydia and gonorrhoea would have been high. This appears to have led to a change in mating behaviour to monogamy.

Chris Bauch, a professor of applied mathematics at Waterloo University in Canada and an author of the study paper, said: “This research shows how the spread of contagious diseases can strongly influence the development of social norms.

“Our social norms did not develop in complete isolation from what was happening in our natural environment. On the contrary, we can’t understand social norms without understanding their origins in our natural environment.