Constellation Brands is upping its bet on the cannabis industry, announcing an additional $4 billion stake in Canopy Growth on Wednesday.

The maker of Corona and Modelo beers in October took a 9.9 percent stake in the Canadian cannabis company. The deal included the option for future investments, giving Constellation a first toehold in an industry the brewer said it expects to soon be legalized across the United States.

Shares of Canopy Growth surged 30.4 percent in Wednesday trading, closing at $32.11 per share, while Constellation's stock fell 6.1 percent to close at $208.28 per share.

With this latest investment and the execution of some warrants, Constellation says its stake will become 38 percent of Canopy. Constellation also received an opportunity over the next three years to buy up to 139.7 million in new shares, which represents up to $5 billion in additional funding. If Constellation utilized those warrants, it could raise its total stake in Canopy to more than 50 percent.

"Over the past year, we've come to better understand the cannabis market, the tremendous growth opportunity it presents, and Canopy's market-leading capabilities in this space," Constellation Brands CEO Rob Sands said in a statement.

"We think the premium paid as well as the size of [Constellation's] investment reflects the long-term attractiveness of the global cannabis opportunity," Cowen analysts said in a note Wednesday. The firm says Constellation's expectation for the deal to be accretive by fiscal year 2021 is also encouraging.

Constellation said it is acquiring the new stake at average prices that are 51 percent higher than Tuesday's close.

Canopy Growth, Canada's largest medical marijuana producer, took a hit after its first earnings report as a public company in the United States. Constellation will nominate four directors to Canopy's seven-member board, although Constellation expects Canopy to continue to operate independently out of Canada.

Canopy CEO Bruce Linton shrugged off concern from investors that Canadian marijuana is overvalued, saying Canopy Growth is focused more on cannabis as a product than as a commodity.

In Canada, "by 2020 or 2021, there will be too much cannabis produced. If I'm still selling primarily an ingredient, I have completely dropped the ball. You want to transform it," Linton told CNBC on June 28.