It’s yet another feather in the cap of those who champion legalizing pot in the US.

In a working paper published by the National Bureau of Economic Research (paywall), researchers observed that in US states with medical marijuana dispensaries, the number of admissions to rehabilitation facilities for pain medication and opioid overdoses has decreased by 15% and 16% respectively.

Other studies have looked at the relationship between legal marijuana use and opioid overdose, but this is the first study to track addiction to opioids as well.

Researchers examined the number of patients admitted to treatment centers in the US for painkiller addiction from 1992 to 2013; opioid-related deaths from 1999 to 2013; and the amount of prescription opioids legally sold to each US state from 2000 to 2011. They found that in states that maintain medical marijuana dispensaries, opioid painkillers are being prescribed at a similar rate to those state without marijuana dispensaries.

That suggests that most of the reductions in addiction and overdoses in states with marijuana dispensaries result from people seeking medical marijuana to alleviate their pain, as opposed to obtaining painkillers illegally. Additionally, they found that legalizing medical marijuana alone didn’t correlate with a decrease in addiction to and overdoses of opioid painkillers. Only states with laws protecting dispensaries saw the decrease.

There were an estimated 2.1 million people suffering from opioid substance abuse disorders in American in 2012, in a problem the Centers for Disease Control has dubbed an “epidemic.” While opioid painkillers (pdf) such as Vicodin, OxyContin, and Methadone can cause individuals to stop breathing if they overdose, it is almost impossible to overdose on marijuana.

The notion that medical marijuana is a safer alternative to opioid painkillers could be influential in boosting the number of US states (which currently stands at 24 plus the District of Columbia) that allow marijuana for medical use.