We didn’t start living on the forest floor because of the alcohol, but it didn’t hurt. A new study suggests the previous estimates that stated human ancestors began consuming alcohol 9,000 years ago is a few orders of magnitude off. The real timeline, researchers claim, traces back as far as 10 million years.

The science relies on a field known as paleogenetics. It takes the ancestral proteins from now-extinct organisms to patch together a guess as to how things looked, on a biological level, in some of our most distance hominid species. The key enzyme scientists argue helped us process alcohol, and later develop a taste for it, is called Class IV alcohol dehydrogenases, or ADH4. And it began with fruit.

When sugars in foods turn into acids, gases, or alcohol (due to a lack of oxygen) the foods ferment. Sometimes we ferment foods on purpose, like if we want to preserve them — think pickles, kimchi, and yogurt. Other times we want to produce alcoholic beverages, such as wine and beer. But fermentation also happens naturally. For our 10 million-year-old ancestors, the environmental changes that compelled us to roam the Earth, instead of dwell in trees, put us in a prime spot to consume ethanol-producing fruits, whether our stomachs could handle them or not.

Matthew Carrigan, a biologist from Santa Fe College in Gainesville, Fla., led a team of researchers in pinpointing when ADH4 first began to appear. The enzyme helps break down alcohol on the tongue and in the esophagus, and later in the stomach. First emerging in the gorilla, the enzyme has since populated chimpanzees and bonobos. Other species, such as orangutans and baboons, would likely have shied away from such fruits, as the fermented sugars would have caused great stomach pain and nausea.

These species predated our transition during the middle Miocene climatic transition, a period in which East Africa’s forest ecosystems morphed into grassland ecosystems, and hanging fruits soon turned into overripe fallen fruits. Gradually, our survival instincts turned into adaptation, which later turned into preference and deliberate recreation of the fermented sugars in beverages such as beers, wines, and spirits.

One hiccup in Carrigan’s findings: the aye-aye. While our 10 million-year-old ancestors stumbled across fermenting fruits once they left the trees, the lemur species, native to Madagascar, predated our ancestors by about 40 million years. Since scientists doubt there was some intervening force that let us once adapt to fermented ethanol before losing it for tens of millions of years, until we gained it back again, they suspect the aye-aye’s natural diet of saps and nectars somehow gave it a predisposed tolerance.

Today, much of the science on fermented foods suggests alcohol isn’t the only thing the process is good for. A great deal of good bacteria comes out of fermenting milk into yogurt, and likewise for fermented juices and beans. Though, ethanol will probably reign as the happiest byproduct — and evolutionary accident — to grace our ancestors’ digestive systems.

Source: Carrigan M, Uryasev O, Frye C, et al. Hominids adapted to metabolize ethanol long before human-directed fermentation. PNAS. 2014.