Women might live longer than men because they are biologically stronger, according to new research.

The idea contradicts a widely held belief that men die younger because of their more reckless or violent lifestyles. Although social and environmental factors may play a role in longevity, a new study in the Proceedings of the National Academy of Sciences explains, women could have a biological advantage over men as well.

The researchers compared the lifespans of men and women in different historical periods in different countries to come to their conclusions. That included people who lived through slavery in Trinidad; famines in 1933 Ukraine, late 18th century Sweden and 19th century Ireland; and measles outbreaks in 19th century Iceland.

“The conditions experienced by the people in the analyzed populations were horrific,” according to the study. “Even though the crises reduced the female survival advantage in life expectancy, women still survived better than men.”

An exception was the slaves in Trinidad, which the researchers suggested could be attributed not to biology but to the fact that the lives of young male slaves would have been more highly valued than those of females. Freed slaves living in Liberia were another group analyzed for the study and in that society, the females had the mortality advantage like in other locations.

It’s not just in more modern times that we see the pattern of women living longer. Previous research has confirmed that women, on average, lived longer than men going centuries back. One recent study, which described finding a new way to estimate the ages of long-dead people based on the condition of their teeth, found the same pattern in the skeletons of English people who lived between roughly 1,400 and 1,550 years ago.

The new study adds to the evidence of the female advantage in longevity throughout human history.

“ We find that even when mortality was very high, women lived longer on average than men,” the authors wrote.

There could be biological factors at play here, because the pattern applied to babies as well — and a baby’s mortality cannot be attributed to behavior and environment in the same way an adult’s can. The study suggests differing sex hormones between males and females might affect longevity.

“The team was not able to pinpoint what sort of biological advantage women might have over men, of course, but note that estrogen is known to be anti-inflammatory and that testosterone may actually cause problems for the immune system,” according to a report on the research.