Got milk? Ancient European farmers who made cheese thousands of years ago certainly had it. But at that time, they lacked a genetic mutation that would have allowed them to digest raw milk’s dominant sugar, lactose, after childhood.

Today, however, 35 percent of the global population — mostly people with European ancestry — can digest lactose in adulthood without a hitch.

So, how did we transition from milk-a-phobics to milkaholics? “The first and most correct answer is, we don’t know,” says Mark Thomas, an evolutionary geneticist at University College London in the U.K.

Most babies can digest milk without getting an upset stomach thanks to an enzyme called lactase. Up until several thousand years ago, that enzyme turned off once a person grew into adulthood — meaning most adults were lactose intolerant (or “lactase nonpersistent,” as scientists call it).

But now that doesn’t happen for most people of Northern and Central European descent and in certain African and Middle Eastern populations. This development of lactose tolerance took only about 20,000 years — the evolutionary equivalent of a hot minute — but it would have required extremely strong selective pressure.

“Something happened when we started drinking milk that reduced mortality,” says Loren Cordain, an exercise physiologist at Colorado State University and an expert on Paleolithic nutrition. That something, though, is a bit of a mystery.

The Clues

Milk, no surprise, is pretty nutritious. It’s got protein, a bunch of micronutrients, lots of calcium and plenty of carbohydrates. For the ancient Neolithic farmer, it was like a superfood, says Thomas.

Even lactose-intolerant adults could have benefited from milk. Chemical evidence from ancient pots shows that these long-ago farmers learned to process the milk into cheese or yogurt, which removes some of the lactose.

But around 8,000 years ago in what’s now Turkey — just when humans were starting to milk newly domesticated cows, goats and sheep — mutations near the gene that produces the lactase enzyme started becoming more frequent. And around the same time, adult lactose tolerance developed. The mutation responsible for that may be between 2,000 and 20,000 years old; estimates vary.

But in order for that new trait to have persisted over many generations, something unique must have given milk drinkers an evolutionary edge.

A Tale Of Famine And Deadly Diarrhea

Thomas thinks a combination of two reasons may explain the persistence of the lactase mutation in Northern Europe.

First, the farmers that settled there came from the Fertile Crescent, and they brought crops native to that region, like wheat and barley. But with Northern Europe’s shorter growing season, these crops were more likely to fail, causing famine.

Additionally, the colder Northern European climate lent itself to natural refrigeration. “If you’re a farmer in Southern Europe, and you milk a cow in the morning and you leave the milk out, it will be yogurt by noon. But if you do the same thing in Germany, it’ll still be milk,” says Thomas. A healthy lactose-intolerant person who drank that still-fresh milk would get a bad case of diarrhea. “But if you’re malnourished, then you’ll die,” Thomas says.

In times of famine, milk drinking probably increased. And the very people who shouldn’t have been consuming high-lactose dairy products — the hungry and malnourished — would be the ones more likely to drink fresh milk. So, with milk’s deadly effects for the lactose intolerant, individuals with the lactase mutation would have been more likely to survive and pass on that gene.

The combination of famine and longer processing time for milk is “kind of like a double whammy,” says Thomas, who has yet to publish his theory. Under his scenario, the lactose tolerant wouldn’t always have had an evolutionary advantage, but for short periods of time, having that genetic mutation would have helped. “Over a long run, it’s modest; but over short periods of time, it’s extremely high selection” for the lactose tolerant, says Thomas.

Scientists may never discover the reason why adult lactose tolerance evolved so quickly. Other researchers have suggested that fresh milk provided a more pure fluid alternative to contaminated water sources in arid environments; that milk fat gave people a fertility advantage; or that milk drinking might have been associated with social prestige. Cordain argues that milk gave humans an advantage against malaria in Africa and Southern Europe, and rickets in Northern Europe.

“Whatever constellation of factors was involved, they’re going to be different in different regions,” says Thomas. “But the selection pressure might have been equally strong in East Africa and Northern Europe, for example.”

It’s hard to tell how prevalent lactose tolerance has been over time. But so far scientists have found evidence of adult lactase persistence in ancient skeletons in Northern Europe, Scandinavia, southern France and elsewhere. Thomas and his colleague Oddný Sverrisdóttir of Uppsala University in Sweden recently discovered lactase persistence in Spanish remains from about 5,000 years ago and hope to publish their research next year.

Thomas thinks that as genetic and archaeological technology continues to develop, modern science may someday reveal the culprit. But it might take a while because the research — like our genes — is still evolving.