That sailors have historically loved their booze is a well-known fact. With journeys sometimes lasting upwards of three months and with fresh drinking water a scarce resource, alcohol was often the only — and safest — option for consumption. For the British Royal Navy, gin was a particular favorite, so much so that the categories “Plymouth” and “Navy Strength” spawn from the navy’s love for the spirit. At one point, gin was even a required ration on all British ships as it was said to possess medicinal qualities able to treat scurvy and malaria.

Beyond the myths surrounding its medical uses — all of which have now been debunked — gin was also enjoyed recreationally, as there wasn’t much else to do while out at sea. What many sailors did do, though, is drink gin with their crews and the crews of neighboring ships. Enter: the gin pennant and the tradition of hoisting up the flag as an invitation for all to come aboard and share a drink.

The gin pennant is a green-white-green-patterned flag with a green Martini glass depicted in the center. While its origins are unknown, the gin flag is thought to have emerged at the height of the British Empire and was a common sighting by the early 1940s. Though most gin pennants were typically made onboard ships, by the 1950s, they were so common that Plymouth Gin — made at the Black Friars Distillery in Plymouth, England — had started manufacturing its own for sale.

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

Any ship wishing to socialize with neighboring crews would raise the flag at the end of a workday, quietly inviting nearby sailors on deck to drink with the officers. In the spirit of not wanting to give away all their liquor to others, ships often attempted to make their pennants as inconspicuous as possible. This was made simple by the fact that the gin flag looks starkly similar — identical with the exception of the absence of the Martini glass — to the NATO Starboard Signal Pennant.

While no official flag was ever established and authorized for usage, the fun of the gin flag caught on among members of other countries’ navies, namely those in the British Commonwealth.

Today, while the gin pennant may not be in use on any U.S. naval ships — alcohol was prohibited aboard in the early 1900s — the flag has broken past its maritime associations and has been used on land to signal the arrival of happy hour. It has even been raised in some bars to announce that all drinks are on the house.