Pete Starman / Getty Images

States that legalize medical marijuana see fewer fatal car accidents, according to a new study, in part because people may be substituting marijuana smoking for drinking alcohol.

Sixteen states and the District of Columbia, have legalized medical marijuana since the mid-1990s. For the new study, economists looked at 1990-2009 government data on marijuana use and traffic deaths in the 13 states that had passed legalization laws during that time period. The data were from the National Household Survey on Drug Use and Health and the National Highway Traffic Safety Administration.

Comparing traffic deaths over time in states with and without medical marijuana law changes, the researchers found that fatal car wrecks dropped by 9% in states that legalized medical use — which was largely attributable to a decline in drunk driving. The researchers controlled for other factors like changes in driving laws and the number of miles driven that could affect the results.

Medical marijuana laws were not significantly linked with changes in daytime crash rates or those that didn’t involve alcohol. But the rate of fatal crashes in which a driver had consumed any alcohol dropped 12% after medical marijuana was legalized, and crashes involving high levels of alcohol consumption fell 14%.

MORE: Study: Legal Medical Marijuana Doesn’t Encourage Kids to Smoke More Pot

The authors found that medical marijuana laws reduced crashes in men more than in women — by 13% compared to 9% — in line with data showing that men are more likely to register as medical marijuana users than women.

The overall reduction in traffic deaths was comparable to that seen after the national minimum drinking age was raised to 21, the authors note.

“We were astounded by how little is known about the effects of legalizing medical marijuana,” lead author Daniel Rees, professor of economics at the University of Colorado-Denver, said in a statement. “We looked into traffic fatalities because there is good data, and the data allow us to test whether alcohol was a factor. … Traffic fatalities are an important outcome from a policy perspective because they represent the leading cause of death among Americans ages 5 to 34.”

The authors also found that in states that legalized medical use, there was no increase in marijuana smoking by teenagers — a finding seen in other studies as well. But, in many cases, the laws were linked with an increase in marijuana smoking among adults in their 20s; this rise was accompanied by a reduction in alcohol use by college age youth, suggesting that they were smoking weed instead.

Studies have consistently found that while mixing either marijuana or alcohol with driving is unadvisable, driving high is much safer than driving drunk. Research on stoned driving is inconsistent, with some studies finding impairment and others not; the alcohol data, however, is clear in establishing a link between drinking and significant deterioration in driving skills. The data also consistently shows that using both drugs together is worst of all.

MORE: Study: Whites More Likely to Abuse Drugs Than Blacks

Driving under the influence of marijuana seems to be less risky because people who are high tend to be aware that they are impaired and compensate, while alcohol tends to increase recklessness and create false confidence. Also, people are more likely to smoke weed at home or in private, rather than out at bars or other public events that require driving to get to.

The research was published by IZA, a nonprofit labor research organization associated with the University of Bonn in Germany. It is a working paper, which means it has not yet been subjected to peer review.

Maia Szalavitz is a health writer at TIME.com. Find her on Twitter at @maiasz. You can also continue the discussion on TIME Healthland’s Facebook page and on Twitter at @TIMEHealthland.