Credit: © Constance Bannister Corp / Getty Images

Shortly, masses of revelers around the world will countdown from ten, kiss someone they love (or some person they have never met) and ring in the new year by popping a bottle of Champagne. But how exactly did glasses of sparkling wine come to be in so many hands at 11:59 every December 31? The answer likely involves a mix of religion, royalty and good marketing.

In the late 5th century King Clovis, the first monarch to unite all the French tribes, converted to Catholicism at the urging of his wife Clotilde. His Christmas Day baptism took place at a church in Reims, which happens to be located in, you guessed it, France’s Champagne region. The bishop who baptized the king used local Champagne wine during the ceremony, giving the wine a certain holy significance. Likely though, the wine used during Clovis’ baptism was still—it would be more than a millennium before wine pros started producing sparkling wine intentionally.

Wine drinkers during Clovis’ time viewed effervescence as a negative. And it was actually an English scientist, Christopher Merret, who first mastered the technique of getting bubbles into wine. According to Tom Stevenson, the author of Christie’s Encyclopedia of Champagne and Sparkling Wine, Merret was more than 20 years ahead of Benedictine French monk Dom Pierre Perignon (yes, that Dom Perignon), first presenting his paper on sparkling beverages to the Royal Society in London in 1662.

Sparkling wine grew in popularity, particularly amongst royals and aristocrats during the ensuing years. One pervasive problem though, was that bottles of sparkling had a tendency to explode. Lots of glass produced at the time wasn’t strong enough to contain the pressure of a sparkling wine. With little warning bottles would simply burst. But the creation of stronger coal-fired glass in England and the subsequent use of that glass by by Perignon made it possible to reliably keep the newly popular sparklers safely.

Another intervention by French royalty cemented Champagne’s claim as the place to get sparkling wine. In 1728, noted Champagne drinker King Louis XV decreed that only wines from Champagne could be shipped in bottles. That meant that the wealthy and the royals would need to get their bubbles from Champagne or risk receiving a flat barrel from somewhere else. With the French market in sparkling wine essentially cornered, Champagne houses like Moët & Chandon rose to prominence and continued to refine their winemaking techniques.

Finally, a savvy advertising campaign would help Champagne gets its reputation as a wine of celebration. As Kolleen Guy points out in the book When Champagne Became French, “Newspaper advertisements, particularly around holidays like Christmas and New Year associated family gatherings with Champagne.”

So as you uncork a bottle tonight take a moment and think back to the medieval French king, the British scientist, the Benedictine monk and the 19th century mad men who made it all possible. And then hurry and get back to finding some stranger to kiss.