Louis Pasteur spent much of his time studying alcohol. | Hulton Archive/Getty

You owe your life to Louis Pasteur’s obsession with alcohol.

When you order wine in a restaurant, the waiter lets you taste it first. It’s not to see if you like how that particular vintage tastes. (You’re supposed to know that already!) The point is to see whether or not the wine has spoiled.

These days, that’s almost never the case. In the olden days, though, it happened much more frequently: “In the mid-19th century … people often encountered bitter, cloudy, or slimy wine,” writes science historian Louise Robbins in his 2001 book “Louis Pasteur and the Hidden World of Microbes.”

Such faults are called “wine maladies.” They became a national crisis for France in 1860. A trade deal with Britain drastically boosted French wine exports, and a lot of the wine turned out to be spoiled. Eager to save France’s reputation and economy, Emperor Napoleon III (Napolean Bonaparte’s nephew) asked the famous French chemist Louis Pasteur to discover why some wines went sour — and fix them.

Pasteur already had experience with alcohol going bad. In 1856, he’d been approached by an industrialist named Monsieur Bigo, whose business was distilling industrial alcohol from beet sugar. Bigo wanted Pasteur to find out why some of his spirit had turned sour like spoiled milk.

At the time, chemists believed fermentation of alcohol was a purely chemical process of sugar breaking down, that didn’t involve living organisms. They thought it was caused by “inherent unstabilizing vibrations” — to a modern scientist, you may as well call that “magic.”

Pasteur suspected otherwise. He decamped for Bigo’s distillery to look at glasses of sour alcohol under a microscope, something no one had reported doing before.

Pasteur was obsessed. “Louis … is now up to his neck in beet juice,” his wife Marie wrote to Pasteur’s father.

In his earlier research, Pasteur had already figured out how to tell living and nonliving molecules apart. And when he examined the spoiled alcohol closely, he knew he was seeing living things.

“Some of the tiny shapes he had viewed under the microscope were living yeast cells, needed to change sugar into alcohol,” writes journalist and author Linda Wasmer Smith. “However, other tiny shapes he had seen there were different microorganisms that were causing unwanted changes. They were the reason Bigo was having trouble making good alcohol.”

Pasteur had discovered bacteria, also known as germs.

He published a paper on the “germ theory of fermentation” in 1857. It was a scientific landmark that also helped give birth to microbiology — the study of microscopic life.

Examining glasses of spoiled wine in 1863, Pasteur remembered the microorganisms he’d seen in Bigo’s distillery years earlier. He theorized that the wine tasted sour because it had a disease, specifically unwanted bacteria.

Pasteur determined that yeast — critical to winemaking — had to be encouraged to grow, while unhelpful bacteria had to be killed. He found that heating wine to 50–60 degrees Centigrade did just that. He patented this method, called pasteurization, in 1865.

Pasteur also isolated the role of oxygen in winemaking. He developed a process that controlled how much oxygen came in contact with wine, and when — using both barrels and bottles.

“It is necessary to aerate the wine slowly to age it, but the oxidation must not be pushed too far. It weakens the wine too much, wears it out,” he wrote. “There exists a period…during which the wine must pass from a permeable container [the barrel] to one nearly impermeable [the bottle].”

Pasteur was credited with saving France’s wine industry. His 1866 essay “Studies on Wine” became the foundation of modern winemaking. Winemakers still use his process today, though they treat wine with sulfites rather than heat-pasteurizing it.

But more significantly for humankind, the chemist also used pasteurization to purify milk, cheese, beer and other products prone to spoilage.

Pasteur used this machine to cool and ferment beer. | Hulton Archive/Getty

Later in his career, Pasteur studied how germs cause disease in animals and humans, helping create the “germ theory of disease.” He created vaccines for chicken cholera, anthrax and rabies, ushering in the era of “preventive medicine.”

The father of microbiology, germ theory, pasteurization, and preventive medicine, Pasteur has saved incalculable millions of lives — but it all began with making better alcohol.