Legalized marijuana is expected to be a $50 billion business by 2026.

Big Beer has been investing in up-and-coming craft breweries as iconic brands struggle.

Weed could be beer industry giants' next big investment to keep up with trends.

As American drinkers lose interest in beer, the marijuana market is exploding.

Beer penetration fell 1% in the US market from 2016 to 2017, while both wine and spirits were unmoved, according to Nielsen ratings. And, beer already lost 10% of market share to wine and hard liquor from 2006 to 2016.

Meanwhile, as legalized marijuana spreads across the US, a new industry is booming. Cowen and Co. estimated in 2016 that the cannabis business makes about $6 billion in annual sales. By 2026, legal weed could be a $50 billion industry, the firm estimated.

That could be bad news for the beer industry. Beer companies could lose more than $2 billion in retail sales to legal marijuana, Forbes reported, citing a study by Cannabiz Consumer Group.

Industry giants — like Corona maker Constellation and Budweiser parent company AB InBev — are fiercely protective of the market.

Craft beer is a perfect example of how beer industry giants deal with threats. From 2009 to 2015, craft brewers went from selling just under 10 million barrels of beer in the US to selling close to 25 million barrels.

At the same time, sales of many of the most popular and iconic beer brands in the US, including Budweiser and Bud Light, were in decline.

Recognizing a growing taste for craft beer, companies better known for brands like Budweiser and Corona began buying up independent breweries with cult followings.

"People are genuinely concerned: Are the big brewers starting to even monopolize craft brewing?" Darby Hughes, trends analyst at food and beverage brand-building boutique Quench, told Business Insider in 2015.

For many brewers, craft beer is just the tip of the iceberg when it comes to competition. Wine, liquor, now weed — all these things can take market share away from beer industry giants. Some craft brewers that have been acquired by Big Beer even argue that the beer industry needs to band together to fend off competition from other categories.

"You guys are literally infighting — this is just a civil war," Walt Dickinson, a cofounder of Wicked Weed, which AB InBev acquired in May, said earlier this year.

"Meanwhile this armada of boats is coming across the Atlantic to crush us and we are shooting each other with, you know, muskets and slingshots," Dickinson continued. "I was just hoping we could get back to just talking about beer, but I guess we're not there yet — but hopefully soon."

Section Grower Morgan Blenk inspects a marijuana plant clone before planting it at Tweed Marijuana Inc in Smith's Falls, Ontario, March 19, 2014. By unlocking the once-obscure medical marijuana market, Canada has created a fast-growing, profitable and federally regulated industry with a distinct appeal to the more daring global investor. About a dozen producers of the drug will find themselves in the spotlight this year as they consider going public or prepare to so through share sales or reverse takeovers to capitalize on recent regulatory changes, investment bankers said. Tweed Marijuana Inc, which converted an old chocolate factory into a marijuana farm, led the pack by becoming the first publicly held Canadian company in the sector. Picture taken March 19, 2014. Blair Gable/Reuters

If marijuana could be an ally instead of a competitor in this boozy battle for drinkers, it could provide a major boost for the beer industry. So, some companies are investing to form alliances early.

On Monday, Constellation Brands — the third-largest beer company in the US — announced it had acquired a 9.9% stake in the Canadian cannabis holding company Canopy Growth. Canopy Growth is one of the biggest names in the legal weed industry, with a market cap of roughly $2 billion.

"Our company's success is the result of our focus on identifying early-stage consumer trends, and this is another step in that direction," Constellation Brands CEO Rob Sands said in a statement.

It seems probable that other beer giants will get in on the action soon. Earlier this year, Lagunitas — a craft beer brand acquired by Heineken — began testing the waters with a marijuana-infused beer in California.

Legalized weed sales are expected to grow 25% through 2020 — a striking growth rate similar to the explosive popularity that craft beer has enjoyed in recent years. Just as Big Beer companies began investing in craft beer in the face of growing competition, marijuana investments and acquisitions are likely to follow.