The pretzel, one of the fastest-growing snack foods in the world, recently crossed a billion dollars a year in sales.

It has its own emoji, comes in flavors like pumpkin spice, mocha and banana, and is now available as an aromatherapy scent. It even has its own special day: April 26 is National Pretzel Day.

But not that long ago, the future of the pretzel didn’t look as shiny as its surface. As I point out in my Food and Society class, foods that are ubiquitous in certain pockets of the world don’t often spread beyond that region. For decades in the U.S., the pretzel wasn’t known outside of the mid-Atlantic states. It took advances in manufacturing and tweaks to the recipe to make it the global snack it is today.

When German immigrants first started coming to America in the 1700s, they brought the pretzel with them. Bavarians and other southern Germans had been enjoying pretzels for hundreds of years. Sometimes they ate pretzels as a side to a main dinner course; other times, they munched on sweet pretzels for dessert. In Swabia, a region in southwestern Germany, signs for bakeries still include gilded pretzels hanging over the door.

Many of these immigrants settled in Pennsylvania’s Susquehanna Valley, where they became known as the Pennsylvania Dutch (Dutch being a corruption of “Deutsch,” the German word for “German”). The pretzel soon became a staple in local bakeries. Italian bakers in Philadelphia also learned how to make them, and peddlers hawking soft pretzels from carts were a familiar sight on city streets.

The food remained a regional specialty until Julius Sturgis opened the first commercial bakery dedicated to pretzels in Lititz, Pennsylvania, in 1861. Like everyone else, Sturgis made pretzels that were soft. But he soon realized that these soft pretzels quickly went stale, which meant they needed to be sold quickly and couldn’t be shipped very far.

To overcome this obstacle, he developed a hard pretzel: By using less water, he was able to create a more brittle, cracker-like snack.

Hard pretzels sealed in an airtight container had a long shelf life, could be shipped nearly anywhere, and could be displayed in attractive tin containers on store shelves. It wasn’t long before others in the area followed Sturgis’ lead and Pennsylvania became the pretzel capital of the world. Today Americans eat many more hard pretzels than soft ones, and more than 80 percent of hard pretzels are still made in Pennsylvania.

Prior to World War II, all pretzels were shaped by hand, and a talented pretzel maker could twist 40 pretzels per minute. Then, in 1947, the Reading Pretzel Machine – which could twist 250 pretzels a minute – debuted. Once pretzels could be made cheaply and in large quantities, national snack food companies took an interest and began to market them across the country.

Pretzels get their sheen and distinct texture from being dipped in a mild lye solution before being baked. Lye is a caustic soda, but not to worry – the baking process converts the lye into a safely consumed carbonate. The lye enhances what’s called the Maillard reaction, a chemical reaction that causes the protein in the flour to brown. It also gives pretzels that slick surface texture.

Though they’re growing in market share, hard pretzels still undersell potato chips by a wide margin. But fresh soft pretzels are having a little renaissance of their own.

Anne Beiler – more famously known as Auntie Anne – started her fresh pretzel business in 1988 in a Pennsylvania Dutch country farmers market.

Today, the mall and airport stalwart has over 1,600 outlets around the world, with regional offerings like a banana pretzel (England), a seaweed pretzel (Singapore) and a date-flavored pretzel (Saudi Arabia).

Pretzels have long been thought of as the perfect accompaniment to beer. With the rise of the craft beer movement, artisan pretzel shops are opening up to give customers the opportunity to pair creative brews with funky pretzels.

What better way to celebrate National Pretzel Day than with an imaginative beer and pretzel pairing? Here are some combinations to get you started: honey mustard pretzels with Hefeweizen, bacon and cheddar pretzels with an India pale ale or peanut butter pretzel nuggets with Dogfish Head Namaste.

Jeffrey Miller, Associate Professor and Program Coordinator, Hospitality Management, Colorado State University

This article was originally published on The Conversation.