States that legalized medical marijuana use saw overdoses from prescription painkillers drop by nearly 25 percent per year, according to a study released on Monday.

"We [found] it surprising that the difference is so big," lead researcher Marcus Bachhuber told ABC News.

The study, published in the journal JAMA Internal Medicine, found that, while painkiller overdoses around the country increased between 1999 and 2010, the increases were higher in states that do not allow patients to use marijuana. On average, states where the drug is legal had 24.8 percent less painkiller-related overdoses than those where it is not.

"Examination of the association between medical cannabis laws and opioid analgesic overdose mortality in each year after implementation of the law showed that such laws were associated with a lower rate of overdose mortality that generally strengthened over time," the study stated.

A spokesperson for the Marijuana Policy Project, a pot advocacy group, told Think Progress that the study refutes claims that medical marijuana runs the risk of being a "gateway drug" for users.

"What we found was that in states where patients have access to medical marijuana, they experienced a better quality of life when they cut their use of hard prescription drugs, which have a very high potential for addiction and fatal overdose," Morgan Fox was quoted as saying. "Even for the nine percent of regular users that become addicted to marijuana, the harms associated with marijuana addiction are far less dangerous and never fatal."

CNN reported that, according to the Centers for Disease Control, 55 percent of fatal overdoses were connected to prescription medications as recently as 2011. Of those deaths, 75 percent involved opioid analgesics like methadone, morphine, and oxycodone.

Medical marijuana use is currently legal in 23 states and the District of Columbia. Legalization measures in Florida, North Carolina, Ohio and Pennsylvania will be decided at the polls this November.

[Image via Agence France-Presse]