Long before happy hours, twofers, and complimentary shots, American bars enticed patrons with the promise of a “free lunch.” Chicago barkeep “Chesterfield Joe” Mackin pioneered the practice in the mid-1800s, serving a free hot oyster with every drink. At the same time, in New Orleans, bars invited drinkers to enjoy a buffet of hot soup, meat pie, and oyster patties, with paying customers given a plate and a complimentary boiled egg.

Not all saloons could serve such elaborate spreads, but the boiled egg presented a rudimentary form of sustenance every establishment could offer. Eggs are relatively cheap and have been commonplace in bars since the popularization of the Flip Cocktail, the recipe for which first appeared in Jerry Thomas’s legendary 1862 manual, “How to Mix Drinks; or, The Bon-Vivant’s Companion.” Before long, boiled eggs became a bar staple whose popularity lasted more than a century.

Compared to pretzels, popcorn, and peanuts, boiled eggs might seem peculiar, but they tick all of the same boxes as their modern counterparts. Served with a sprinkling of salt, eggs encourage revelers to drink more but help them stay within the blurry lines of sobriety if they do so. There’s also nutritional logic attached to pairing eggs with alcohol: Eggs contain cysteine, a key amino acid that aids liver function and, crucially, helps prevent hangovers.

Get the latest in beer, wine, and cocktail culture sent straight to your inbox.

For all bar snacks, hygiene is a sensitive but important topic, but it’s one in which boiled eggs fare surprisingly well. Once cooked, boiled eggs can safely sit at room temperature all afternoon and into the evening. The egg’s hard shell also protects the edible interior from contamination.

Around the time New Orleans bars introduced “free” lunches (patrons were still required to pay for drinks), boiled eggs started appearing in different forms in saloons across the U.S.

Rather than serve them in their shell, German-run bars introduced pickled eggs as a homey comfort for European expats. Peeling and pickling the cooked eggs offered the added advantage of not requiring bar staff to clean up pieces of broken shell, and the process also preserves the protein for longer without needing refrigeration.

The popularity of the customary jar of pickled eggs was eventually cemented in literature and popular culture. According to the 1982 “Farmers Market Cookbook,” “No self-respecting barroom would be caught without a jar of pickled eggs on the bar.”

Meanwhile, the snack received somewhat less appetizing coverage in numerous episodes of “The Simpsons.” In America’s most famous dive bar, Moe’s Tavern, the questionable hygiene of the snack became the punchline of multiple jokes. And it was this issue that caused the simple bar snack’s ultimate demise.

A major health scare at the end of the 1980s highlighted the risk of contracting salmonella from raw or undercooked eggs. While it’s still possible to find jars of pickled eggs in some neighborhood bars, they’re nowhere near as popular as in their heyday, nor are they the barometer for “self-respecting” barrooms. The only folks cracking (down on) boiled eggs nowadays are regional health departments.