The Earl of Sandwich is credited with inventing the sandwich because he wanted to eat his meal with one hand during a 24-hour gambling event and instructed his servant to put his meat between two slices of bread. But what many may not know, is how an American classic sandwich—the iconic peanut butter and jelly sandwich—came to be. If the Earl of Sandwich invented the sandwich, who invented the PB&J?

The story begins with the three essentials parts of the PB&J—peanut butter, jelly and bread. First, let’s start with the bread, which is, of course, an ancient food that has been around for tens of thousands of years.

The significance of the bread component in the PB&J sandwich is the invention of pre-sliced bread in the early 1900s. Otto Frederick Rohwedder invented a bread slicer but bakers were not interested because they thought no one would want their bread pre-sliced. Rohwedder kept refining his invention and changing things until it was ready to use in bakeries. He advertised the machine as “the greatest step forward in baking since bread was wrapped.” Later, the slogan evolved into “the greatest thing since sliced bread.”

Sliced bread proliferated. Soon people were looking for spreads to use with this newfound wonder food.

Next, let’s look at jelly; which is another food that has been around for a long time. In the case of the quintessential American PB&J sandwich, the most important person in this part of the story is a man named Paul Welch. In 1917, Welch secured a patent for pureeing grapes and turning them into jelly. He developed and advertised Grapelade (rhymes with marmalade) from Concord grapes—this was popular with America’s troops in WWI. When soldiers came home after the war, it was popular to spread Grapelade on bread.

Finally, there’s the peanut butter. Contrary to popular belief, peanut butter was not invented by Dr. George Washington Carver. But he is crediting with advancing the peanut crop in the South in the early 1900s and published his “300 Uses for Peanuts,” which included a peanut paste.

The forerunner of the peanut butter we know today was first brought to light sometime during the 1880s when a St. Louis physician, Dr. Ambrose Straub, made a peanut paste for geriatric patients who had trouble swallowing, or had bad teeth. Around the same time, Dr. John Harvey Kellogg (same as the cereal) was the first to patent a process for manufacturing peanut butter. Peanut butter was first introduced at the 1893 Chicago World Fair. In 1904 Dr. Straub got a food company to develop the peanut spread and they took it to the St. Louis World Fair where it became so popular, grocery stores began ordering it.

Around the same time, peanut butter appeared in upscale tea rooms in New York City and was considered a delicacy. On the menu of Vanity Fair Tea Room was peanut butter with watercress. Other tea rooms featured peanut butter and pimento sandwich and peanut butter on toast triangles with soda crackers.

In 1901, the first peanut butter and jelly sandwich recipe appeared in the Boston Cooking School Magazine of Culinary Science and Domestic Economics written by Julia Davis Chandler. She said to use currant or crab-apple jelly and called the combination delicious and as far as she knew, original.

Still, the peanut butter and jelly sandwich was an exclusive food, and its popularity among the masses was yet to come. As Grapelade and pre-sliced bread became popular, another breakthrough happened with peanut butter—commercial brands found a way to create creamier peanut butter that didn’t stick to the roof of the mouth so easily. And during the Great Depression of the 1930s, families discovered peanut butter provided a satisfying, high protein, less expensive meal.

But the major event that took the peanut butter and jelly sandwich over the top in popularity was WWII.

Peanut butter and jelly were on the U.S. Military ration menus in World War II. Peanut butter was a high-protein, shelf-stable ingredient and easily portable on long marches. Grapelade had already accompanied soldiers in the first world war and added a sweetness to the sandwich. With pre-sliced bread so easy to use, the natural inclination was to combine these three items, and before long the good ol’ PB&J was a part of the American soldier’s life.

When soldiers came home from the war, peanut butter and jelly sales soared. Kids loved it because it tastes great, parents loved how easy it was to make and how kids could make it themselves with pre-sliced bread. Many families and college students on a budget relied on PB&J.

So, the story of the peanut butter and jelly sandwich is the story of three essential ingredients; all of which have been around for a long time, joining together to give us America’s favorite and enduring sandwich.