The total number of suicides in California per year, including those committed with firearms, declined after the state legalized marijuana use for medical purposes, according to a new study.

“Findings reveal that rates of total suicide and gun suicide dropped significantly in the aftermath of Proposition 215,” the researchers concluded, referring to the California law legalizing medical cannabis that voters approved in 1996.

Nationally, the number of suicides increased by 24 percent from 1999 to 2014—the same 15-year period during which many states began approving access to medical marijuana.

“The systematic evidence connecting this trend to the availability of medical marijuana is ambiguous, however,” the team behind the new study wrote.

For the paper, published this month in Archives of Suicide Research, researchers at the University of California Irvine looked at the total number of suicides, the number of gun-related suicides and the number of non-gun-related suicides recorded by the state for the years between 1970 and 2004. They also looked at data from the 41 states that did not legalize marijuana during the same time period to get an idea of what might have happened if California had not approved access to medical cannabis.

Ultimately, the authors observed a notable decline in intentional deaths in the years after Prop 215 was approved. “In particular, for all suicides, our results demonstrate that California’s 1996 intervention led to an average reduction of 398.9 suicides per year and a cumulative reduction of approximately 3,191 suicides during 1997-2004,” the study states. “Similarly, legalization led to a reduction in gun suicides of 208 per year on average and a cumulative reduction of approximately 1,668 fewer gun suicides during 1997-2004.”

The impact of medical marijuana on rates of non-gun suicides in the state, however, was deemed “ambiguous.”

The question, of course, is what could explain these overall findings?

The study offers a few different theories. One focuses on how marijuana use may help remove the actual motivation for suicide. People with mental conditions such as depression, for example, may find that marijuana alleviates their symptoms.

“If marijuana alleviates the acute stress associated with these disorders, we expect suicide risk to decrease following legalization of medical marijuana,” the authors wrote. “The evidence for this is mixed, however.”

The same goes for people with alcohol use disorder, which is associated with an elevated risk of suicide: If people are using marijuana in place of alcohol, that risk may be reduced.

“If marijuana and alcohol use are combined, one might expect no change in suicide risk or even an increase in suicide following legalization,” the paper reasons. “If marijuana replaces alcohol, on the other hand, one might expect a decrease in suicide risk following legalization.”

But most data on marijuana as an alcohol substitute is based on self-reports, which can be unreliable.

There’s also the issue of gun accessibility for medical marijuana patients; U.S. law prohibits anyone who uses federally illegal controlled substances, including cannabis, from obtaining firearms. As a majority of suicides involve guns, researchers suggest that access to medical marijuana may have precluded some people from purchasing firearms, thus leading to the decline in suicide rates. (For what it’s worth, California also has some of the toughest gun laws in the country.)

The study’s authors point out that testing these various theories “may reveal insight into why we do not find the expected reduction in non-gun suicides following legalization.”

In 2018, former National Rifle Association president David Keene argued that federal restrictions regarding cannabis and gun access were causing “real problems” for patients, writing in an op-ed that “hundreds of thousands of gun owners … are being forced to either trade their Second Amendment rights for a chance to live pain-free or risk prosecution and imprisonment.”

Last month, a Republican congressman filed a bill that would allow medical marijuana patients the ability to purchase and own firearms.