During the French Revolutionary Wars, the French army had a problem. A big, smelly, potentially deadly problem. It was so big that on this day in 1795, they offered 12,000 francs to anyone who could successfully solve it.

That problem—how to store food safely—was one shared by most of the rest of humanity, which probably explains why its solution has been so popular and lasting: canning. When left out, food, as we all know, goes bad. Take this issue and multiply it by the size of your average army and, well, you have a real issue.

Although food could be dried, smoked, fermented or pickled before the invention of canning, none of these methods were certain to be safe and they didn’t preserve flavor, according to the City University of New York. Cue Nicolas Appert, a candymaker and winner of the prize money and the title “The Father of Canning.” It took him 14 years of experimentation, writes Encyclopedia Britannica, but he developed a canning process that worked.

Canning works by placing food in jars or cans (jars, in Appert’s early work) and heating the whole set-up to a temperature that kills bacteria and other microorganisms. As the jars/cans cool, a vacuum seal is formed which prevents other microorganisms from getting in.

Here’s the thing, though: Appert could never explain why his method worked. Approaching the problem (and eager for the prize money), he reasoned that if the method worked for wine, why not food, writes Brian A. Nummer for The National Center for Home Food Preservation. Appert’s work was centered around the idea of removing air from food, writes Jerry James Stone for The Kitchn. Appert’s method, Stone writes, started with putting food in jars, “which were then corked, much like wine, and sealed off with a wax seal. The jars were wrapped in canvas and then boiled.”

After years of experimentation, Appert decided, correctly, that the two most important factors in canning were "the absolute deprivation from contact with the exterior air" and "application of the heat in the water-bath."

“In about 1806 Appert’s principles were successfully trialed by the French Navy on a wide range of foods including meat, vegetables, fruit and even milk,” Nummer writes. Then in 1810, Appert got the money and published his results, as stipulated in the award deal. His book’s title translates to The Art of Preserving All Kinds of Animal and Vegetable Substances for Many Years.

But it was years before Louis Pasteur’s research would reveal the relationship between microorganisms and food going bad, Nummer writes. Appert knew that it worked, but he had no idea why, and neither did those, like Englishman Peter Durand, who refined his idea. Durand got the patent for the tin can in 1810. It would be more than 50 years before Pasteur would make the innovation that bears his name—pasteurization.