Legalizing medical marijuana does not lower the rate of deadly opioid overdoses, according to a study released Monday.

The findings, published in the journal Proceedings of the National Academy of Sciences, may serve as a blow to those in the cannabis industry, and even doctors, who hoped that laws in favor of medical marijuana might bring down the ever-rising rates of people dying from overdosing on heroin or other opioids.

The intriguing promise of legal medical cannabis lowering opioid overdose rates was based in part on a 2014 study that showed that states that had passed medical marijuana laws by 2010 had about a 25 percent lower opioid overdose death rate than states that did not allow medical marijuana.

"It would be wonderful if it worked, but it doesn't seem like it does," said the new study's lead author, Chelsea Shover, apostdoctoral research fellow at Stanford University.

About 47,600 people died in the U.S. of an opioid overdose in 2017, according to data from the Centers for Disease Control and Prevention. That's more than 130 people a day.

"A lot of people treated it as evidence that medical cannabis could reverse the opioid crisis," Shover said of the 2014 study. "But does that really hold up over time? In short, what we found was no."

Indeed, even authors of that 2014 paper expressed caution at the time, writing, "Although the present study provides evidence that medical cannabis laws are associated with reductions in opioid analgesic overdose mortality on a population level, proposed mechanisms for this association are speculative and rely on indirect evidence."

So Shover and her colleagues replicated the original study, but with expanded data to look at states that legalized medical marijuana through 2017. While they did confirm the preliminary 2014 finding, the results changed as the years went by and additional states passed medical cannabis laws.

"What we found was that association between enacting a medical cannabis law and the rate of deaths from opioid overdose actually reversed over time," Shover said. "When we did the study in 2017, the association was that states that enacted a medical cannabis law actually had higher opioid overdose deaths after the laws took effect." Those states, they found, had about a 23 percent higher opioid overdose death rate than states in which medical marijuana remained illegal.

"With the benefit of the passage of time and more data, the scientific community has a clearer view," she added.

Experts not involved in the new research agreed.

"We really have to proceed cautiously when we look at state-level findings to support or dispute the potential role that cannabis might have within the space of the opioid epidemic. You cannot come to any causal conclusion," said Ziva Cooper, research director at the UCLA Cannabis Research Initiative at the Jane and Terry Semel Institute for Neuroscience and Human Behavior.

"These are correlations based on a lot of things that are happening in these individual states," Cooper said.

Indeed, Shover proposed a different explanation for the original 2014 finding. States that had passed the earliest laws legalizing medical marijuana (Alaska, California, Colorado, Oregon and Washington) tended to be wealthier. And they may have had more access to addiction treatment and medications used to reverse opioid overdoses.

"We don’t think cannabis was saving lives at the population level 10 years ago, and we don’t think it’s killing people now," Shover said. "We think these two factors are separate issues."

The study's authors stressed, however, that their findings should not derail research into the possible benefits of medicinal marijuana, even as it relates to the opioid epidemic. In fact, a recent study from the Icahn School of Medicine at Mount Sinai found that a component of cannabis called cannabidiol (CBD) could reduce cravings and anxiety in people with a history of heroin abuse.

"We don't know what else will be found regarding medical marijuana. That research should absolutely continue," Shover said. But, she adds, lawmakers should not assume medical marijuana is an effective strategy for addressing the opioid crisis.

Pot's popularity — either for recreational or medicinal use — shows no sign of waning. And much of it is driven by older adults hoping cannabis will ease a variety of ailments. A recent University of Colorado study found adults over age 65 generally use pot to treat pain, anxiety and depression. Indeed, data from the National Survey on Drug Use and Health show a more than tenfold increase in marijuana use among baby boomers since 2007.

Currently, 33 states have comprehensive medical marijuana laws, while 11 states and the District of Columbia also have laws allowing recreational marijuana.

FOLLOW NBC HEALTH ON TWITTER & FACEBOOK