There’s nothing better after a hard day’s work than kicking back with some friends and downing a few cocktails. For bars, pubs, and restaurants, the practice of happy hour specials—typically held between the hours of 4pm and 8pm—has become a commonplace way to boost sales on slow weekdays and to let their customers relax to make them “happy” before dinner. But the concept of the “Happy Hour” isn’t merely a marketing strategy, and the history of hitting the sauce at half price has a surprisingly strong—if not varied—connection to American history.

Happy hour these days is clearly linked to getting slightly intoxicated without making too big a dent in your wallet, but the term itself comes from American Naval slang in the 1920s following the First World War. A “Happy Hour” was an allotted period of time on a ship where sailors engaged in various forms of entertainment to relieve the monotonies of the seafaring life. Most of the time, this meant wrestling or boxing matches, but it still could include other athletic activities intending to boost morale.

At the same time, the U.S. was going through the darkest—not to mention driest—period in the history of getting hammered: Prohibition, the failed experiment given legal standing by the infamous Volstead Act. From 1920 to 1933, the manufacture, transport, and sale of certain intoxicating beverages was prohibited. (Sacramental wines and cider fermented by farmers were given exemptions.)

But instead of abiding by the newly enacted teetotal tenet, Americans became as alcoholic as ever, and would gather together in secret speakeasies or at home to consume some tantalizingly illegal cocktails to wet their whistle before dinner. “Happy Hour” as an expression was soon picked up, either directly or secondhand, from the Naval slang and merged to describe these outlawed gatherings.

Though Prohibition was later repealed, the concept stuck around. Some think that a Saturday Evening Post article from 1959 that mentioned the happy hour in regards to military life introduced the expression to the public, but other sources, like the OED, cite later examples—such as a 1961 Providence Journal article referencing Newport policemen “deprived of their happy hour at the cocktail bar”—as informally spreading it into the general vernacular over time. Eventually, in the '70s and '80s, it was co-opted by the service industry as the food and drink specials we know today.

The happy hour isn’t a universal concept, however. Currently, 23 states have banned restaurants and bars from selling "alcoholic beverages during a fixed period of time for a fixed price," including Massachusetts, which was the first state to do so, in 1984—no small feat when you consider that Boston was recently named the drunkest city in America. Yet some states, like Pennsylvania—which extended the minimum happy hour period to four hours in 2011—encourage a restaurant’s ability to schedule their specials however they please. Internationally, the happy hour was banned in Ireland and very specific restrictions were put in place in the rest of the UK in an effort to curb culturally acceptable binge drinking, while in Canada the term “Happy Hour” in regards to drink specials is banned in Ontario [PDF], and in Alberta regulations strictly limit drink prices and happy hours until 8pm.