(Reuters) - Constellation Brands Inc STZ.N racked up millions of dollars in losses from its investment in Canadian pot company Canopy Growth, pushing the maker of Corona and Modelo beers into a quarterly loss and sending its shares down as much as 8%.

FILE PHOTO: A bottle of Modelo Especial beer, one of Constellation Brands Inc products, is shown in this illustration photograph taken in Encinitas, California, U.S. June 27, 2016. REUTERS/Mike Blake/Illustration/File Photo

The brewer has invested over $4 billion in Canopy WEED.TO, making it one of the first major alcohol producers looking to cash in on the proposed legalization of recreational weed in several countries.

However, the pot producer has been reporting losses as it invests in equipment, research and marketing, warning in August that it would need another three to five years to turn profitable.

“Clearly, the Canopy investment has not turned out how they would have liked it to so far,” said William O’ Neil analyst Andrew Kessner.

“They knew the investment was going to be a drag for a while... but I think what has changed since then is that it is kind of clear now that Canopy’s runway to profitability... is much longer than Constellation anticipated.”

Net loss attributable to Constellation was $525.2 million in the second quarter ended Aug. 31, compared with a profit of $1.15 billion a year earlier, due to $484.4 million in losses from the Canopy investment.

Constellation said it also marked down $839 million in value of its investment in Canopy during the quarter.

The brewer also cut its fiscal 2020 earnings per share on a reported basis to 55 cents to 75 cents from $4.95 to $5.25, but raised its adjusted profit forecast that excludes the costs related to Canopy investments to $9 to $9.20 from the previous range of $8.65 to $8.95.

Constellation’s loss from Canopy overshadowed a better-than-expected quarterly adjusted profit that was driven by summer demand for its Modelo Especial and Corona beers.

The company’s legacy business has been growing steadily as Constellation adds Mexican and craft beers to its portfolio, helping cushion the impact from waning beer demand across the globe.

Sales of beers, its biggest business, rose about 7.4% to $1.64 billion, lifting overall sales about 2%.

Excluding items, Constellation earned $2.72 per share, above analysts’ estimate of $2.60, according to IBES data from Refinitiv.