Nothing rings in the new year like a solution of bubbling, neurotoxic ethanol. Humanity’s longstanding relationship with alcohol poses an evolutionary puzzle: Surely natural selection would weed out those of our ancestors with a taste for something that clouds judgment, slows reflexes, dulls the senses and impairs balance. Animals in such a state would likely be the first picked off by predators, if they hadn’t already fallen out of a tree.

Yet, humans all over the world drink ethanol in various concoctions or they enforce strict rules against it — rules that surely wouldn’t exist if there weren’t a desire. We’ve been at it a long time: Archaeologists have found wine and beer stains on 10,000-year-old stone age pottery.

Scientists are solving the paradox by studying the enzymes our bodies use to digest alcohol. Lots of animals make these enzymes, called alcohol dehydrogenases, and the way these vary from one species to another tells an evolutionary story. Then there’s the related question of whether other species imbibe. Preliminary investigations suggest the answer is yes.

“We think we drink alcohol so we can get drunk,” said Matthew Carrigan, a biologist who studies the evolution of alcohol use. “But if you were living in the wild, wandering around surrounded by predators at night, would you want to be inebriated?”

What scientists have learned recently is that among our fellow mammals, just humans, gorillas and chimpanzee share a mutation that improves the way our stomachs break down ethanol. This change probably equipped members of our evolutionary branch to handle the weak alcohol content of fermenting fruit — not wine, scotch or martinis. But an adaptation to stronger stuff may be in progress.

This mutation probably happened around 10 million years ago, when humans, chimps and gorillas shared a common ancestor, said Carrigan, who now works at Santa Fe College in Gainesville, Florida.

This fateful mutation occurred in a gene that holds the code for a version of alcohol dehydrogenase called ADH4. The reason this and other alcohol dehydrogenase genes already existed in the animal kingdom, he said, was that nature makes a number of different alcohols. Plants, including cinnamon and geraniums, make alcohols as a defense, and animals have evolved enzymes that serve as countermeasures.

The way the mutation spread suggests there was an advantage to those who had it, and Carrigan thinks it has something to do with fermented fruit. Ten million years ago our ancestors lived on fruit, and there’s evidence that around this time the African climate cooled off, forests became savannahs, and our ape ancestors spent more time on the ground, where they’d probably encounter a lot more fermented fruit than they would in the trees. Those who could eat the fermenting fruit without becoming impaired had a big advantage over those who couldn’t stomach it — or those who could but got wobbly afterwards.

As a natural next step, Carrigan is now studying the drinking proclivities of our fellow primates. There are lots of anecdotal reports of apes, birds and even elephants getting drunk on fermented fruit, but repeated alcohol use is not scientifically documented, he said. Some of those animals may have recognized their mistake and not repeated it.

There are rules against offering banana daiquiris to endangered primates, so Carrigan is collaborating with anthropologists to investigate local observations that chimps in West Africa like to steal a fermented drink called palm wine, breaking into barrels and scooping it up with leaves.

There’s a big alcohol content difference between naturally fermented fruit, with at most 1 percent alcohol, and man-made beverages, which are typically above 3 percent. This suggests that neither we nor our cousins the chimps are well-adapted to drinking wine, let alone hard liquor.

But some may be ahead of the evolutionary curve. People in parts of China and Southeast Asia were among the first to cultivate a grain — rice — and, inevitably, to make wine from it. Once that happened, a mutation started to spread in another gene associated with alcohol digestion — AHD1. Those with the mutation processed alcohol faster than everyone else. Instead of getting drunk, they’d get flushed and sick from the fast buildup of one of the byproducts of alcohol breakdown — acetaldehyde.

Some might think this is a defect, but scientists believe it’s an adaptation, protecting people from alcohol impairment and alcoholism. It’s already spread to 60 percent to 70 percent of those with Han Chinese ancestry — suggesting that evolution can sometimes protect us from ourselves. Those without the mutation get drunk because natural selection hasn’t had time to catch up.

Faye Flam is a Bloomberg View columnist.