For some chronic pain patients, there’s a correlation between daily cannabis use and a decreased likelihood of opioid drug use. According to a new study published this week, researchers found that participants who had chronic pain and used cannabis every day were almost 50 percent less likely to use illicit opioids—substances like heroin and prescription painkillers such as oxycodone and morphine used off-label—on a daily basis.

The new paper draws on data taken between 2014 and 2017 as part of two long-running observational studies of people who use drugs on Vancouver’s Downtown Eastside. One of the studies has been running since the mid-1990s and the other since the mid-2000s. The observations consist of interviews about lifestyle, pain, drug use, health and other factors, as well as blood samples. Over the years it has been running, the study has furnished data to HIV and Hepatitis C researchers as well as, more recently, to those trying to combat the opioid crisis.

Most of the study participants are marginally housed or homeless, says study author M-J Milloy, who holds a research chair in cannabis science at the University of British Columbia, and rates of drug use–and overdose–are extremely high among this group compared to the general population. (Milloy’s position is endowed by the Canopy Growth Corporation, formerly known as Tweed Marijuana Inc., but he is not paid directly by the corporation, nor was funding for the study.)

As a result, “we’re very interested in figuring out what causes overdose risk,” says Milloy. Based on their research, it’s clear that chronic pain is one of the biggest contributors to overdose risk, he says. Marginalized people whose existence is also heavily criminalized “cannot access the sort of legal analgesics that they need to address chronic pain,” he says, and are more likely to self-medicate using illegal drugs or marijuana in order to manage their pain.

But the results of this study suggest that cannabis might play a bigger role in chronic pain management than researchers once thought. Although the study authors caution their results aren’t conclusive—the population they studied was very specific, and it was an observational look only—their evidence adds weight to a hypothesis that has been gaining traction in the biomedical community in recent years: Regular cannabis use may have an “opioid sparing effect”. In other words, it might be able to allow chronic pain patients to use less opioid medication.

A 2014 study found that states with medical marijuana laws had lower rates of fatal opioid overdoses than states without such laws. Since that paper came out, a host of new research looking into the potential for cannabis as harm reduction for chronic pain patients has begun, says Milloy. This also prompted his team to start looking into the relationship between cannabis and chronic pain.

There aren’t a lot of studies showing the relationship between opioids, marijuana, and chronic pain in humans, says Bernard Le Foll, an addiction scientist at The Centre for Addiction and Mental Health in Toronto who was not involved in the study. “It’s very clear in animal studies that a cannabinoid drug can have an opioid sparing effect,” he says, but there’s very limited human data. This study provides further evidence. (Le Foll’s work has been funded by the Canopy Growth Corporation in the past.)

The next step, Milloy says, is to start doing trials in a controlled setting to see if measured amounts of cannabis can help chronic pain patients who are also drug users managing their pain. Milloy says this research has already been funded and they plan to start recruiting study participants early next year.