New research suggests that making recreational weed legal could lead to a 20 to 35 percent downturn in the number of opioid overdose deaths in the US.

It's the first study to claim that making one drug legal for all was actually responsible for fewer deaths from the other - though previous studies have said the opposite.

Scientists at the University of Massachusetts (U Mass) found that the more people that had access to marijuana - which becomes most readily available where recreational use is legal - the fewer die from opioid overdose.

But, for now, the relationship between marijuana and opioids remains a tumultuous one, with research alternately indicating that weed is a boon or a bust for public health.

Legal recreational weed means more dispensaries and better access to marijuana - and that could mean a 21% reduction in all opioid overdose deaths and a 33% decline in deaths from potent, synthetic drugs like fentanyl, a new study suggests

By the end of 2017, 29 states and Washington, DC, had all legalized medical marijuana (that number has now risen to 33, plus the capitol).

Of those, eight and DC allowed recreational marijuana by the end of 2017 (now, it's 11 states).

The U Mass researchers found that, after marijuana legalization, opioid deaths fell, whether the drug was made legal for medical use only or medical and recreational use.

In states where residents could only use marijuana with a card, or prescription, weed was linked to a between one and 1.27 fewer deaths per 100,000 people each year.

For an average state of around five million people, that would mean the 50 fewer would die each year from synthetic opioids like the potent fentanyl, alone.

But it wasn't legalization itself that drove opioid deaths down.

Instead, the researchers found that opioid overdose deaths only fell once residents of a state actually had better, easier access to weed via dispensaries cropping up in their areas.

So, perhaps unsurprisingly, it was the legalization of recreational marijuana that seemed to drive down overdose deaths most dramatically, according to the new data analysis, published in the journal, Economic Inquiry.

'Medical marijuana legalization covers a small subset of the population, but recreational marijuana legalization expands access by 10-, 20-, 40-fold,' lead study author Dr Nathan Chan, a U Mass professor of environmental and public economics, told DailyMail.com.

His study suggests that access to recreational marijuana reduced opioid deaths on the whole by 21 percent, and prevented 33 percent of deaths from synthetic opioids.

'It's speculative, but we're thinking that there are a few reasons people use marijuana: recreationally and for pain management,' says Dr Chan.

'What might be going on is that people who experience pain and are sort of self-medicating through marijuana take away the pain they're suffering won't go toward synthetic opioids in the first place.'

A recent Columbia University study, on the other hand, found that people who had been taking prescription opioids for pain management were not, in fact, the ones switching to medical marijuana when it came into effect in their states.

And a Stanford study, published in June, demonstrated that opioid overdose deaths actually shot up in states where medical marijuana was legal.

The effects of recreational weed on opioid overdoses have not been so widely studied.

Experts have, however, looked into other public health consequences of broader legalization.

Car crashes, fatal accidents and teen hospitalizations all surge in the wake of legalization - so weed is not without its human costs.

Dr Chan argues that we need to look at both sides of the equation.

'I know most of the policy battle [over marijuana legalization] isn't centered around opioid mortality - it's not what's in the forefront of policymaker's minds' he said.

'But if you're taking into account the totality of effects, this research is suggesting some benefits.

'As a policy maker, I would hope that they're taking into account all of these different things when making policy changes.'