The Industrial Revolution led to a boom in extramarital affairs with six boys in 100 raised by men who were not their biological fathers, a study has revealed.

The revelation comes from a study that has put DNA evidence together with long-term genealogical data to explore questions of biological fatherhood among people living in parts of western Europe over the last 500 years.

It found that evidence of so-called extra-pair paternity (EPP) events - women having babies with someone other than their partner - was fairly low, but rose among poorer people who lived in densely populated cities in the 19th century.

In the modern day the question of paternity can be solved with a simple test, but things were not so easy five centuries ago

Study author Maarten Larmusea, of Belgian university KU Leuven, said: 'Of course, extra-pair paternity, especially due to adultery, is a popular topic in gossip, jokes, TV series and literature.

'But scientific knowledge on this phenomenon is still highly limited, especially regarding the past.

'Our research shows that the chance of having extra-pair paternity events in your family history really depends on the social circumstances of your ancestors.'

In terms of evolution, remaining faithful to a partner is not always the most advantageous strategy.

Males may benefit from straying by siring extra offspring, and females may benefit by mating with superior males.

The researchers looked at how often this has happened in human societies over time.

Their study, published in Current Biology, covered several centuries during which there were dramatic changes in the human social environment.

To estimate historical rates of women having babies with someone other than their husband among married couples, researchers identified 513 pairs of contemporary adult males living in Belgium and the Netherlands.

Based on genealogical evidence the men shared a common paternal ancestor and therefore - barring an extra-pair paternity (EPP) event - should have carried the same Y chromosome.

Putting the two together, the researchers suggest the estimated EPP rates for the families varied by more than one order of magnitude

If the researchers found a mismatch that could not be explained by mutation between the Y chromosome genotypes of the men in a pair, this indicated at least a single EPP event happened in the genealogy leading from their common paternal ancestor.

In 25 out of 96 mismatch cases (26 per cent), Y chromosome genotypes of one or more additional DNA donors helped to further narrow down the exact part in the genealogy where the EPP event happened.

The scientists also obtained genealogical records of all paternal ancestors, including their year and place of birth, and social class based on their occupation.

The evidence showed no significant difference in EPP rates between countries despite key religious differences, according to the study.

But they varied widely with socioeconomic status and population density.

The EPP rate was much lower among farmers and better off craftsmen and merchants - about one per cent - than among lower class labourers and weavers - about four per cent.

The rates also rose with population density, with researchers suggesting this could have been caused not just by a growth in adultery but also a rise in sexual violence against women.

Putting the two together, the researchers suggest the estimated EPP rates for the families varied by more than one order of magnitude.

This was about 0.5 per cent among the middle to high classes and farmers living in the most sparsely populated towns, to almost 6 per cent for the low socioeconomic classes living in the most densely populated cities.

They say the findings support evolutionary theories suggesting individual incentives and opportunities for seeking or preventing extra-pair mating should depend on the social context.

The scientists argue their findings debunk the notion that EPP rates in western society are generally high, noting the evidence puts average rates at around one per cent.