States that have legalized medical marijuana have 25 percent lower rates of painkiller overdose deaths as compared to other states, a new study has found.

Researchers at Penn State, who conducted the study, say that they aren't sure why legalizing medical marijuana reduced death rates related to overuse of common opioid analgesics, such as OxyContin, Percocet and Vicodin. These drugs work by suppressing pain perception and overdose of these drugs is known to be fatal.

A majority of all deaths due to opioid analgesic overdoses, around 60 percent of them, are in people who have legitimate prescriptions, researchers say.

Also, the number of people using these drugs for non-cancer pain has increased in the past decade. The scientists say that more studies looking into the safety and efficacy of marijuana are needed urgently to povide some relief from the epidemic of prescription painkiller overdoses.

For the study, the researchers used data from all 50 states between 1999 and 2010 on deaths due to painkiller overdoses.

"Most of the discussion on medical marijuana has been about its effect on individuals in terms of reducing pain or other symptoms," said lead author Dr. Marcus Bachhuber in an email to Reuters Health. "The unique contribution of our study is the finding that medical marijuana laws and policies may have a broader impact on public health."

California, Oregon and Washington were the first states in the U.S to legalize medical marijuana in 1999. Today, 13 states in the country allow marijuana to be used for medical purposes.

The researchers found that states with medical marijuana laws had 24.8 percent lower opioid overdose mortality rate than other states.

Bachhuber cautioned that evidence for cannabis' pain killing properties is still limited. Still, better medical marijuana laws could lower pain in some people.

 "In addition, people already taking opioids for pain may supplement with medical marijuana and be able to lower their painkiller dose, thus lowering their risk of overdose," Bachhuber said in a news release.

The National Institutes of Health and others supported the study. It is published in the journal JAMA Internal Medicine.