Marijuana advocates say the drug is the safest option for patients seeking instant pain relief. Opponents see little to no medicinal value in cannabis and consider the drug unsafe. And medical experts are divided on the issue. The conclusions of a new study by a team from the University of Pennsylvania’s medical school suggest the pot advocates have it right.

According to the study, published in the latest issue of JAMA Internal Medicine, US states that have legalized medical marijuana recorded lower rates of deaths resulting from overdoses of opioid analgesics. These drugs, which include painkillers like Oxycontin, Percocet, and Vicodin, often are prescribed by doctors to treat moderate to severe pain and to suppress a patient’s perception of pain.

The researchers examined the rate of deaths caused by opioid overdoses between 1999 and 2010. The results showed that on average, the 13 states that started allowing the use of medical marijuana before or during that period had a roughly 25% lower annual opioid overdose mortality rate after the laws were enacted than in states where the drug was prohibited.

The findings suggest that medical marijuana may be a safer alternative treatment for patients suffering from chronic pain related to cancer or other conditions. (In the US, where the number of people who are prescribed opioids for non-cancer pain has almost doubled over the past decade, about 60% of fatal opioid analgesic overdoses occur in patients who have legitimate prescriptions.)

Medical marijuana “may provide relief for some individuals,” the study’s lead author, Marcus Bachhuber, said in a release about the findings. “In addition, people already taking opioids for pain may supplement with medical marijuana and be able to lower their painkiller dose, thus lowering their risk of overdose.”

The researchers concluded that the relationship between lower opioid overdose deaths and medical marijuana laws has strengthened over time. For example, the opioid overdose mortality rate was nearly 20% lower in the first year after a state’s legalization of medical marijuana, and roughly 34% lower five years after implementation. The team recommended that as more states debate legalizing medical marijuana and implement new laws, “[f]urther investigation is required to determine how medical cannabis laws may interact with policies aimed at preventing opioid analgesic overdose.”