Famine helped contribute to milk tolerance in Europeans, a new study of ancient DNA from early Iberian farmers revealed.

The ability of most adults of European descent to produce the enzyme lactase necessary for digesting the milk sugar lactose only came about in the last 10,000 years or so. Called lactase persistence, the trait arose in pastoralist populations, although it's not clear why it evolved so quickly.

For a while now, researchers have argued that the answer has to do with farmers who drank milk avoiding calcium deficiencies since milk not only contains calcium, but vitamin D as well, which is necessary for calcium absorption. The latter would have been especially helpful given that many would have likely faced limited sunshine - one of the body's most efficient sources of the vitamin.

"For them, milk could have been the new superfood" said Oddný Sverrisdóttir, from Evolutionary Biology Centre at Uppsala University.

However, Sverrisdóttir notes, this does not explain why the trait persisted in those who lived in the sun-filled region of modern-day Spain, saying: "If natural selection is driving lactase persistence evolution in a place where people have no problems making vitamin D in their skin, then clearly the vitamin D and calcium explanation ... isn't cutting it. So while the calcium assimilation hypothesis may have some relevance in Northern Europe it's clearly not the whole story."

Studying DNA from the bones of early Spanish farmers, Sverrisdóttir and her colleagues were unable to identify the mutation that causes lactase persistence in Europeans. What's more, computer simulations designed to reveal how much natural selection was needed to give rise to the pervasiveness of the trait seen today in that part of the world suggested the answer is "a lot."

"The evolution of lactase persistence is one of the best known and most dramatic examples of recent human evolution. One of the ironies of working in this area is that we know it happened but we still don't fully know why," Sverrisdótti said.

Based on their findings, the researchers suggest a new answer to the puzzle.

Despite not having been lactase persistent, the majority of early European farmers would have been able to consume fermented milk products just fine since the process converts most of the lactose into fats.

When famine arose, the fermented products would have likely been eaten relatively quickly, which would have only left high-lactose products. These would have triggered the same symptoms then as they do today for those who are lactose intolerant, only for malnourished individuals, diarrhea is not just uncomfortable - it's life threatening.

Famine, the study concludes, could have therefore "led to episodes of very strong natural selection favoring lactase persistence," Uppsala University wrote.

The study was published in the journal Molecular Biology and Evolution.