At the end of the last Ice Age, 11,700 years ago, only babies would have been able to digest lactose, one of the key sugars in milk. Being able to do so into adulthood is a new development in our evolution. It’s especially common in people of European, South Asian, Middle Eastern, and West African descent, and evolved so quickly that it’s the textbook example of human adaptations to agriculture.

But according to new research published this week in the journal Nature, ancient humans in Europe drank lactose, even without being able to digest it. Only when famine and disease turned lactose into a liability did adults hang onto lactase, the key enzyme that breaks down the sugar.

“What we’ve shown is the received wisdom is erroneous,” says study co-author Richard Evershed, an archaeological and paleo-chemist at the University of Bristol. The textbook story is that the lucky few milk-drinkers got some kind of advantage from the beverage—maybe it let them grow faster, or gave them extra vitamin D in dark Northern latitudes—that led to the proliferation of lactase-processing genes.

The speed with which Europeans picked up lactose tolerance means that people without it must have been at an extreme disadvantage. “You’ve got to kill somebody to have [that kind of] selection, to put it bluntly,” Evershed says. 

The new story of milk-drinking unfolds through three lines of evidence. The first is a map of nearly 13,000 ancient pottery fragments collected from Portugal to Turkey to Finland. Although the contents of the pots were long dried up, animal fats leave distinctive residues—which allows researchers, 9,000 years later, to tell if they held milk.

[Related: How to make oat milk—with science]

Those ancient films show that milk drinking is essentially as old as farming, and spread into Europe as early as 6,500 BCE, 3,000 years before the rise of lactase in adults, or lactase persistence.

So how did farmers who couldn’t process lactose end up drinking milk? It turns out that the health effects of lactose intolerance are often blown out of proportion, George Davey Smith, an epidemiologist at the University of Bristol, and another author, says. Bloating, gas, and other purported signs of lactose intolerance are less common than people think. And while undigested lactose can cause diarrhea, so can coffee, prunes, and plenty of other enjoyable foods.

Using the 500,000-person genetic database UK Biobank, the researchers found that well over 90 percent of people who can’t process lactose still drink cow’s milk. It turns out that lactose tolerance just isn’t a big factor in determining your ability to stomach cow juice. “One of my co-authors only did a lactose test when she was part of the project,” says Evershed. “She found she was lactose intolerant, and she’d been drinking milk. She had no hint of it.” Some who don’t naturally produce lactase can still digest it with the help of an adapted gut biome. Others produce the enzyme to digest the sugar, but are allergic to another part of milk.

“It became clear that people could happily drink milk,” enzyme or no, says Davey Smith.

But if milk goes down so easily, that leaves another mystery: Why would ancient Europeans so quickly have developed lactose tolerance, if they didn’t need it?

The key is in understanding what happens when times get bad. In a person who can’t process milk sugar, the excess sits in a little wad in the colon. “The undigested lactose sort of sucks water out,” Davey Smith says, sometimes causing diarrhea. That’s not always a problem—but when a person is malnourished, or sick with an intestinal disease, the lactose poops can make them sicker.

On a population level, during disease outbreaks or famines, milk could turn from a source of calories into a kind of poison. And, based on the genes of ancient European bones, it was the ability to resist that poisoning that drove lactose tolerance across the continent.

[Related: Heat stress might curdle the dairy industry]

By lining up the map of ancient milk-vessels, the presence of the enzyme in ancient genes, and the frequency of ancient skeletons, the researchers found that people who drank milk faced no evolutionary pressure to digest lactose. “This pulls the rug out from under the feet of just about every theory for why that natural selection was there,” says Mark Thomas, a study co-author and expert in human evolution at University College London. “Milk use doesn’t explain anything.”

Instead, bumps in lactase persistence were best explained by evolutionary pressure during population crashes. “Those drops in population almost certainly indicate famines,” says Thomas. And famines would have had a two-fold effect. When food was scarce, ancient farmers would have eaten up all their low-lactose yogurts and cheeses first. Once crops fail, “they’re going to be left only with fresh milk,” Thomas says. Couple high-lactose foods with severe malnourishment, and diarrhea is no longer inconvenient—it’s fatal. 

Dense populations, measured via the distribution of skeletal remains, also explained some of the pressure towards lactase persistence. This, the researchers believe, happened as children—still young, but too old to produce lactase—were increasingly exposed to the threat of lactose diarrhea and intestinal infectious diseases that thrived in close quarters. The combination of those forces largely explain how, by the beginning of the Iron Age, roughly 3,000 years ago, lactase persistence had become so common.

That timeline also contradicts a theory that the adoption of agriculture, roughly 10,000 years ago, left humans sicker and malnourished, Davey Smith says. “It doesn’t fit in with the chronology… which says agriculture is the worst mistake humans ever made—that’s what I thought we’d find. It turns out it was 5,000 years later.”