It's one of the most celebrated feats of World War II: On June 6, 1944, more than 160,000 troops stormed the beaches of Normandy during the D-Day invasion. Less known is that an unlikely snack helped power the Allies before, during and after the historic mission—Hershey’s chocolate bars.

In 1937, the U.S. Army approached the Hershey Company about creating a specially designed bar just for its emergency rations. According to Hershey’s chief chemist Sam Hinkle, the U.S. government had just four requests about their new chocolate bars: They had to weigh 4 ounces, be high in energy, withstand high temperatures and “taste a little better than a boiled potato.” The army didn't want the bar to be so tasty that soldiers would eat it in non-emergency situations. 

Hershey Chocolate Emergency Ration during World War II
David E. Scherman/The LIFE Picture Collection/Getty Images
An emergency ration chocolate bar at Fort Myers, circa 1940.

The final product was called the “D ration bar,” a blend of chocolate, sugar, cocoa butter, skim milk powder and oat flour. The viscous mixture proved too thick to move through the normal chocolate-bar manufacturing set up at the Hershey plant, so initially each bar had to be packed into its 4-ounce mold by hand.

READ MORE: How Allied Forces Overcame Disastrous Landings to Rout the Nazis

As for taste, well—most who tried it said they would rather have eaten the boiled potato. 

The combination of fat and oat flour made the chocolate bar a dense brick, and the sugar did little to mask the overwhelmingly bitter taste of the dark chocolate. Since it was designed to withstand high temperatures, the bar was nearly impossible to bite into. Most men who ate it had to shave slices off with a knife before they could chew it. 

Did you know? Milk chocolate is such a relatively new invention, that even early prototypes of the machine gun were created before it. 

Despite the U.S. Army’s best efforts to stop the men from doing so, some of the D ration bars ended up in the trash. Later in the war, Hershey introduced a new version, known as the Tropical bar, specifically designed for extreme temperatures of the Pacific Theater. By the end of the war, the company had produced more than 3 billion ration bars.

Hershey Chocolate Emergency Ration during World War II
Roberts/Classic Stock/Everett
A 1940 emergency ration Hershey's chocolate bar.

The bar was hardly the only sweet in the D-Day rations. Sugar was an easy way to pep up the troops, and the quick burst of energy it provided made a welcome addition to kit bags. Along with the D rations, troops received three days worth of K ration packs. These were devised more as meal replacements and not sustenance snacks like the D rations, and came complete with coffee, canned meats, processed cheese and tons of sugar. At various points during the war, men could find powdered orange or lemon drink, caramels, chewing gum and—of course—more chocolate. 

In addition to chocolate, Hershey also produced parts for naval anti-aircraft guns. And the company wasn't the only food titan of the era that joined the nationwide effort to support American troops. Heinz created self-heating cans that could be lit with a cigarette, Kellogg’s supplied K-Rations for soldiers' breakfasts.

READ MORE: Hershey’s Once Violently Suppressed a Strike by Chocolate Workers