One unexpected benefit of medical marijuana legislation appears to be a decrease in painkiller overdoses, perhaps because some chronic pain patients are turning to cannabis instead of powerful opioid drugs.

In states with laws legalizing medical marijuana, new research shows there are nearly 25 percent fewer deaths from painkiller overdoses. Opioid painkiller overdoses are a growing problem nationwide. More than 16,500 Americans died of opioid drug overdoses in 2010, and the numbers continue to rise.

Although a causal relationship hasn’t been proven, there appears to be a significant association between marijuana legislation and a fall in overdose deaths.

Researchers from the University of Pennsylvania reported that in states that enacted medical cannabis laws between 1999 and 2010, there was a 24.8 percent lower annual opioid overdose death rate, compared to states without medical marijuana laws. The study was funded by grants from the National Institutes of Health and the Center for AIDS Research at the Albert Einstein College of Medicine in New York City.

“We found it surprising that there was such a large difference in opioid painkiller overdose rates associated with implementation of a medical marijuana law,” said lead study author Dr. Marcus Bachhuber, a VA Scholar at the Philadelphia Veterans Affairs Medical Center.

Researchers think that lower overdose rates could be due in part to other things states were doing to address prescription painkiller overdoses during the same period, such as providing public education on painkiller abuse.

According to the American Academy of Pain Medicine, 1.5 billion people worldwide suffer from chronic pain. Opioid painkillers have long been an option for treating that pain, but their use comes with an inherent risk of addiction and death from an overdose. Chronic pain is also a major driver of medical cannabis use, which is why the researchers wanted to see whether medical marijuana laws and deaths from opioid overdoses were linked at the state level.

Researchers analyzed medical cannabis laws and death certificate data from 1999 to 2010. In 1999 three states — California, Oregon, and Washington — had medical marijuana laws. Ten more states enacted medical marijuana laws between 1999 and 2010.

Primary care physicians take care of people with chronic pain. It’s inevitable that at some point, a patient will come down with aches and pains and head in to see a doctor. As a primary care provider, Bachhuber sees patients living with chronic pain, some of whom tout the benefits of medical marijuana use.

Read More: 70 Percent of Americans Take Prescription Drugs »

“I’ve even seen people who would tell me that they had tried prescription painkillers like Vicodin, Percocet, or OxyContin,” Bachhuber said. “But the only thing that worked for them was marijuana.”

Bachhuber and his colleagues wondered how having access to alternative options for pain relief would impact painkiller use.

“We thought maybe, if people chose marijuana over prescription painkillers on a large scale, medical marijuana states might see relatively lower rates of painkiller overdoses — and even overdose deaths,” Bachhuber says. It turned out that his hunch was correct.

As more states and physicians navigate the legality and use of medical marijuana, it will be important to consider its risks as well as its positive fringe benefits.

“Many medical providers struggle in figuring out what conditions medical marijuana could be used for, who would benefit from it, how effective it is, and who might have side effects,” Bachhuber said. “More studies about the risks and benefits of medical marijuana are needed to help guide us in clinical practice.”

Images by Tony Bueno.