A new study recently published in the International Journal of Drug Policy linked legal medical marijuana to a decrease in opioid use, adding to a growing body of research confirming that cannabis can serve as an effective replacement for addictive opioid pharmaceuticals.

According to the study, around 116 million Americans suffer from chronic pain, and about five to eight million of these patients currently depend on opioids for long-term pain management. Lead author Jamie Flexon, criminal justice professor at Florida International University (FIU), believes that opioid medications are actually ineffective at treating chronic pain. According to the US Centers for Disease Control and Prevention, exercise and over-the-counter painkillers are more effective than opioids at reducing the symptons of chronic pain.

Several recent studies have also shown that medical marijuana can treat symptoms of chronic pain without the negative side effects or risks associated with opioid use. Flexon and two of her FIU peers tested this theory by using data from the National Survey on Drug Use and Health to determine the effects of medical marijuana laws on opioid use. The study reports that patients with legal access to medical cannabis use fewer opioid drugs, confirming these prior studies.

“Opioids are ineffective as a means to control chronic, non-cancer related pain, as well as being linked to a myriad of issues associated with opioid use disorder,” Flexon said in a statement. The new study suggests that legal medical marijuana “may be effective at reducing opioid reliance as respondents living in states with medical cannabis legislation are much less apt to report using opioid analgesics than people living in states without such laws.”

The study also assessed the risks of medical cannabis use as a treatment for chronic pain. “In terms of comparative risk, cannabis has a much lower risk profile across multiple studies compared to other psychoactive substances, including opioids,” Flexon said, according to the Miami New Times. The study also debunked the “gateway drug” myth often touted by prohibitionists, reporting that states with legal medical marijuana did not have greater rates of opioid abuse.

“A lot of people are concerned with cannabis being a gateway drug or that more permissive attitudes about marijuana would potentially increase opioid misuse but we don’t find any effect,” Flexon explained

The study did note that some medical marijuana users reported minor side effects, including “mental cloudiness” and sedation. But these issues pale in comparison to the risks of addiction and overdose associated with opioid medications.

“Recent projections indicate that opioid overdoses will worsen with an annual number of deaths reaching approximately 82,000 by 2025, yielding a total of more than 700,000 projected deaths between 2016 and 2025,” the study reports

Flexon goes on to explain that many patients misuse opioid medications based on the false belief that they are safer than illegal drugs. The legalization of medical marijuana is starting shift this perspective, helping reticent opioid users feel confident in switching from pharmaceutical meds to state-legal cannabis products when applicable.

The study did not examine whether the shift from opioids to cannabis was driven primarily by patients, doctors, or a combination of both, however. Flexon and her co-authors recommend that further research be conducted to more fully investigate the connection between medical marijuana laws and reductions in opioid use and abuse.