Now that 30 U.S. states and Washington D.C. have legalized medical marijuana, employers are increasingly facing the reality of having their employees fail a drug test over their legal use of cannabis. There is no shortage of research on the effects of alcohol or opioid intoxication on workplace health and safety, and most companies have policies in place to deal with employees intoxicated on these drugs. Cannabis is a different story, however, and although many medical marijuana users across the country have found themselves getting fired over their legal drug use, there is little scientific research on the possible risks of cannabis use in the workplace.

A new research study has set out to correct this problem, and made the surprising discovery that workplace fatalities have been significantly declining in states with legal medical marijuana. The study, published in the International Journal of Drug Policy, examined data from the Bureau of Labor Statistics reporting the number of workplace fatalities in every state between 1992 and 2015. The researchers found that states that legalized medical marijuana saw an almost 34% reduction in workplace fatalities among employees aged 25 to 44 within five years of passing their MMJ law.

The same reduction was not as present among workers aged 16 to 24, however. The researchers did find that states allowing chronic pain as a qualifying condition for medical marijuana were associated with greater reductions in fatalities than states that did not. The research does not provide any scientific explanation for this phenomenon, but the latter finding may be an important clue. “Further investigation is required to determine whether this result is attributable to reductions in the consumption of alcohol and other substances that impair cognitive function, memory, and motor skills,” the researchers concluded.

Numerous research studies have already found that legal cannabis is connected to decreases in opioid use and abuse, as well as alcohol use and binge drinking. Cannabis-derived medicines, especially non-psychoactive CBD-based treatments, can effectively treat chronic pain without the negative side-effects associated with opioids. Similarly, workers suffering from chronic pain may be less likely to drink alcohol on the job if they can legally use medical marijuana, again decreasing the risk of accidents. The researchers believe that additional studies will be necessary to confirm whether this hypothesis is true, but conclusively state that their “results provide evidence that legalizing medical marijuana improved workplace safety for workers aged 25–44.”

The findings of this study may help provide a scientific basis for protecting the rights of individuals using state-legal medical marijuana at work. Over the past several years, many workers have lost their jobs after failing a drug test due to their legal medical cannabis use. Courts have backed employers’ rights to terminate legal medical marijuana patients in many states, but Maine, Arizona, Minnesota, and Illinois have passed laws protecting MMJ users’ rights to work. Federal employees are also at risk of being fired over state-legal MMJ use, but a new bill proposed by Rep. Charlie Crist would grant both government employees and military veterans the right to use state-legal cannabis on their own free time.