Marijuana Moment is a wire service assembled by Tom Angell, a marijuana legalization activist and journalist covering marijuana reform nationwide. The views expressed by Angell or Marijuana Moment are neither endorsed by the Globe nor do they reflect the Globe’s views on any subject area.

Several studies have linked legal marijuana programs to lower rates of opioid overdoses, but most of that research has focused on broad, state-level data. Zoom in closer — to the county level — and the role of dispensaries where people can actually purchase cannabis becomes clear.

Looking at mortality records from 2009 to 2015, a team of researchers investigated whether the presence of dispensaries in counties with medical cannabis laws had an effect on deaths from prescription opioids, synthetic opioids, and heroin. The results supported previous research, indicating that access to marijuana can mitigate the opioid epidemic.

This study, published in October, was written by three researchers: Julio Garin at Claremont McKenna College, R. Vincent Pohl at the University of Georgia, and Rhet A. Smith at the University of Arkansas at Little Rock.

But not all counties in legal states allow dispensaries to operate. The study found that counties with dispensaries experience 6 to 8 percent fewer opioid overdose deaths overall and 10 percent fewer heroin overdose deaths.

“Importantly, these effects are limited to counties where dispensaries opened and do not apply to non-dispensary counties in states with that have legalized medical cannabis,” the researchers wrote. That is, “while legalizing medical cannabis is not associated with lower levels of opioid overdose mortality, the presence of dispensaries has a large negative impact on the number of opioid-related deaths.”

The study focused on non-Hispanic white men aged 15 to 54. Theoretically, the results indicate that for every 100,000 people in this demographic, 10 fewer people would have died from opioid overdoses between 1999 and 2015 if states that legalized medical cannabis had dispensaries in all counties from the start.