Since prehistoric times, humans have found ways to make food last longer through a variety of methods ranging from fermentation and pickling to salting, smoking and drying, but a method for preserving food in a nearly-fresh state had remained elusive. In 1795 the French Directory (the final phase of the nation’s government following the French Revolution) decided that something needed to be done about the military’s food supply. During that year French forces fought battles in Italy, the Netherlands, Germany and the Caribbean, highlighting the need for a stable source of food for far-flung soldiers and sailors. The Directory’s leaders decided to offer a 12,000-franc prize through the Society for the Encouragement of Industry for a breakthrough in the preservation of food.

Fourteen years later, Napoleon was emperor, his military was powerful but hungrier than ever and Nicolas Appert, a young chef from the region of Champagne, finally won the sought-after prize. Appert, who had worked as a chef for the French nobility, dove into the study of food preservation. His innovation, when it arrived, came packed in the strongest airtight containers he had access to: champagne bottles, sealed with an oddly effective mixture of cheese and lime. Appert’s discovery built on earlier imperfect techniques, which either removed air or preserved food by heat but hadn’t managed to do both.

Running a bustling lab and factory, Appert soon progressed from champagne bottles to wide-necked glass containers. In 1803 his preserved foods (which came to include vegetables, fruit, meat, dairy and fish) were sent out for sea trials with the French navy. By 1804, his factory had begun to experiment with meat packed in tin cans, which he soldered shut and then observed for months for signs of swelling. Those that didn’t swell were deemed safe for sale and long-term storage.

In 1806 the legendary gastronomist Grimod de la Reynière wrote glowingly of Appert, noting that his canned fresh peas were “green, tender and more flavorful than those eaten at the height of the season.” Three years later, Appert was officially awarded the Directory’s prize, with the stipulation that he pay to publish his method, which he did in 1810 as” The Art of Preserving, for Several Years, all Animal and Vegetable Substances.”

Appert’s process (which was quickly built upon by canners across the English Channel) was all the more amazing because it predated Louis Pasteur’s discoveries of germ growth and sterilization by more than 50 years. Canned food also predated, by around 30 years, the can opener itself. The first metal canisters were made of tin-plated steel or even cast iron, with heavy lids that had to chiseled open or stabbed through with soldiers’ bayonets.

After winning the prize, Appert spent many more years working to improve his method amidst the chaos of post-Napoleonic France. His factories remained innovative but unprofitable, and he died a poor man in 1841 and was buried in a common grave. By then variants of his process were used to can foods ranging from New York oysters and Nantes sardines to Italian fruit and Pennsylvania tomatoes.

The availability of canned food played a crucial role in 19th century, feeding the enormous armies of the Crimean War, the U.S. Civil War and the Franco-Prussian War, and offering explorers and colonialists a taste of home in unfamiliar lands. Following the global depression of 1873, U.S. exports of canned foods boomed, led by the Campbell, Heinz and Borden companies. In 1904, the Max Ams Machine Company of New York patented the double-seam process used in most modern food cans. Today a double-seam machine can safely seal more than 2,000 cans a minute—a long way indeed from Appert’s pea-packed bottles.