During World War I the trenches of the Western Front ran right through the vineyards of Champagne, the historic French winemaking region 90 miles north of Paris. Between 1914 and 1918, heavy shelling uprooted row upon row of chardonnay and pinot noir vines, pruned short per the instructions of a 17th-century Benedictine monk named Dom Pérignon. Many of the region’s residents were driven underground by the fighting, hiding out in the limestone caves usually used for the storage and manufacture of the region’s signature sparkling wine. By the time the armistice was signed in 1918, a huge portion of Champagne’s vineyards had been destroyed.

All told, the devastation of the war amounted to only a minor setback in the improbable rise of Champagne’s signature product, the bubbly beverage synonymous with traditional celebrations, modern luxury and conspicuous consumption. Champagne the place had seen battles before (Attila the Hun, the Hundred Years’ War, the Franco-Prussian conflict) and would again (World War II) but from the mid-19th century through the present day, the biggest battles over Champagne the drink involved not soldiers, but lawyers, treaties, trademark officials and scores of angry French citizens. All this for a local drink whose signature feature—its fizz—is the very thing old Dom Pérignon spent much of his life trying to eliminate.

When wine has bubbles, it’s a sign that it has continued to ferment inside the bottle. For much of the history of viniculture, this was a no-no, a mark of wine gone bad, associated with murky, unstable and unpredictable vintages. Although a few vineyards had produced intentionally sparkling wine (as early as the 15th century in Limoux in the South of France), it was only in the late 1600s that bubbly from Champagne began to be produced and respected. Wines from Champagne had a tendancy to fizz because early frosts often led to incomplete fermentation during the manufacturing process. When things warmed the following spring, some of the wine would begin to sparkle. Fizzy Champagne, in fact, was popular among the well-to-do in Georgian England before it became so in the courts and chateaus of pre-Revolutionary France. Barrels of the stuff were shipped across the channel and bottled there. In the early 1600s, English coal-fired glassworks produced bottles far stronger than anything wood furnaces could manage. By 1740 molding techniques had arrived, which allowed for the production of identical bottles and standardized corks. Suddenly the fizz could be contained.

In 1815, another key innovation arrived from a Champagne producer known as the Widow Cliquot. Champagne’s in-bottle fermentation clouds the wine with dead yeast (early Champagne glasses were made mottled to help hide this effect). Getting rid of the yeast during manufacturing took an expert hand and spilled a lot of precious bubbly. Cliquot’s innovation was to turn the bottles neck-down and let the yeast settle in the neck in a process known as “remuage” or riddling. Once the murk was isolated, the bottleneck could be submerged in icy brine, freezing the bad bits into a floating plug of wine-debris that could then be removed before the remaining clear bubbly was sweetened and re-corked.

Along with engineering, it took advances in European understanding of chemistry and biology to make possible the Champagne we know today. Before the Enlightenment, even master winemakers had very little understanding of how fermentation worked. In 1662 English physician Christopher Merret published a paper noting that if you added sugar to wine it would continue to ferment in the bottle, yielding bubbles. More than a century later, pioneering French chemist Antoine-Laurent de Lavoisier (who named oxygen and hydrogen) showed that during fermentation sugars broke down into alcohol and carbon dioxide—the stuff of bubbles. It took Louis Pasteur, in 1860, to explain fermentation as a biological process with yeast at its center.

Champagne had been a luxury good since the Marquis de St-Evremond first introduced it to fashionable London in the 1660s. Philip, Duke of Orléans made it a fixture of the hedonistic parties that marked his regency from 1715 to 1723. Several of today’s oldest and most renowned Champagne houses were established during the long reign of Louis XV, including those of Ruinart (1729), Moët & Chandon (1750) and Louis Roederer (1776). Napoleon’s march on Moscow in 1812 helped secure Champagne’s popularity among the Russian upper classes—in fact, the Cristal brand of Champagne was created by Roederer in 1876 for Tsar Alexander II of Russia, whose paranoia demanded a clear bottle on the table, lest anything dangerous be hidden inside.

During the French “Belle Époque” (the peaceful decades between 1871 and 1914), Champagne became a mass-market luxury, its story woven into French popular culture by paid and unpaid marketing. Painters from Manet and Cézanne to Mucha and Toulouse-Lautrec depicted it in their panoramas of modern life. Novelists such as Goethe, Zola and Pushkin wove it into their stories. Champagne bottlers issued commemorative labels expressing all manner of public sentiments: liberalism, conservatism, nationalism. During the Dreyfus affair at the turn of the 20th century, an ill-advised producer even bottled a “Champagne Antijuif” marketed to anti-Semites. More benign vintages were offered for the celebration of every conceivable life transition: engagement Champagne, marriage Champagne, new-parent Champagne. Advertising associated Champagne with Christmas and New Year’s. Old traditions of pouring out wine when launching a new ship were modernized, with a bottle of Champagne shattered against the side to christen new steamships and airplanes. Production skyrocketed: 30 million bottles were shipped in 1900.

All that bubbly, and all that money, caused conflict as the traditional producers of the Champagne region sought to keep their brand undiluted by winemakers making bubbly with grapes from other parts of France or other countries entirely. Although the first attempts to ban the use of “champagne” as a generic label date to the mid-1800s, it took until 1919 (and riots by various vintners) to settle on the official boundary lines of Champagne’s grape-growing area, outside of which true Champagne could not be made. In 1936 Champagne’s Appellation d’origins Controlée (AOC), which still controls use of the term in Europe, was established by French law.

Champagne-like sparkling wines continue to be made outside of France. Some, like cava from Spanish Catalonia or prosecco from northeastern Italy, have created their own regional definitions and gained their own followings. Other bubblies, particularly in the United States where the AOC rules don’t apply, have long branded themselves “champagne” or “California Champagne.” In addition to the origin of their grapes, many of these wines are made with more efficient industrial processes that avoid the need for bottle-by-bottle riddling and brining.