Home Depot Inc. executives said the nation’s opioid crisis could be contributing to an unexpected surge in thefts from its stores and warehouses.

The company said distribution centers that house its goods and those of other retailers have been targets of organized groups of criminals who are stealing millions of dollars’ worth of products. The theft, which retailers call shrink, has gotten so bad that it will narrow Home Depot’s operating profit margins next year, it said on a call with analysts Wednesday.

“This is happening everywhere in retail,” Chief Executive Officer Craig Menear said on a call with analysts Wednesday. “We think this ties to the opioid crisis but we’re not positive about that.”

Home Depot’s admission is one of the first times a major U.S. retailer has specifically called out the opioid epidemic as a factor in its performance and financial results. Retailers lose about $51 billion in sales from shrink annually, according to a report this year from the National Retail Federation, which said that “criminals have many ways to steal from retailers.” Most retailers have security systems in place in both their stores and warehouses, but the addictive nature of opioids has made criminals bolder.

In one instance, thieves were caught attempting to steal $16.5 million worth of goods, of which $1.4 million was destined for Home Depot’s stores, executives said on the call. In response, Home Depot is using technology including machine learning to anticipate where the organized crime rings are headed next. It’s also installing technology so that power tools won’t work unless they go through the retailer’s point-of-sale system, and also taking some high-value inventory off the sales floors.

“We have to be vigilant about it,” Ann-Marie Campbell, Home Depot’s executive vice president of U.S. stores, said. “We have initiated several pilots to reduce shrink across the board.”

The impact of thefts was a “significant” reason why Home Depot’s operating profit margin should narrow to about 14% next year, it said. That forecast sent the retailer’s shares down as much as 2.5% Wednesday. The impact of thefts should abate after 2020, it said.

This story was provided by Bloomberg News.