Throughout the United States, prescription drug overdoses have been a major problem. But now, with the rise of medical marijuana in many states, the number of deaths from pharmaceutical painkillers is on the decline.

Deaths caused by prescription of Opioid (opium), Vicodin, and OxyContin have approximately tripled since 1991, and every day 46 people die of such overdoses in the United States. However, in the 13 states that passed laws allowing for the use of medical marijuana between 1999 and 2010, 25 percent fewer people die overdoses of opioid drugs each year.

Colleen Barry, a health policy researcher at Johns Hopkins Bloomberg School of Public Health in Baltimore, is certainly impressed by these results, and she reminds us that marijuana is far less toxic than these prescription drugs. It is “basically impossible,” she explains, to die from an overdose on weed.

Based on these numbers, it would certainly seem that marijuana use has led to this reduction in deaths, though many are opposed to this conclusion. Some, like Dr. Andrew Kolodny, Chief Medical Officer at Phoenix House, believe this reduction has less to do with marijuana substituting for pain pills, and is more reflective of a progressive push, in general, to treat addiction. He also argues that marijuana isn’t widely prescribed for pain relief even in the states in which it is legal, noting that “You don’t have primary care doctors in these states prescribing marijuana instead of Vicodin.”

He believes that states which legalize medical marijuana are also more likely to actively treat and help prevent addiction, and this comprehensive approach more likely explains the numbers.

On the other side of the equation, different companies are trying to resolve the mater of overdose itself by producing medicines that cannot possibly be taken in large amounts at once. Egalet Corporation, for example, a rapidly growing specialty pharmaceutical company, is devoted to making powerful painkillers for patients with moderate to severe pain safer from abuse.

Robert Radie, the president and CEO of Egalet Corporation, explains he “was really intrigued with the magnitude of the problem of prescription drug misuse,” and that Egalet has a “unique technology” for stopping addiction before it can start.

According to Radie, many patients misuse their drugs unintentionally. In efforts to get more immediate pain relief, for example, they might chew instead of swallow their pills, which can lead to overdoses. As a result, the company works to produce pills that cannot be pounded into powders to be snorted or chewed. And if someone tries to turn them into an injectable liquid, the pills turn to a gummy, gooey substance instead.

Egalet offers introduced three products — SPRIX , OXAYDO, and ARYMO — which were filed in December for FDA approval.

Regardless of how we look at the situation, however, the use of medical marijuana certainly warrants further study. According to JAMA, an international peer-reviewed general medical journal, smoking cannabis can help painkiller addicts by reducing the severity of withdrawals and health symptoms related to opioid abuse. Perhaps because of this, among other reported benefits, 20 states have reported marijuana legalization measures for the 2016 election.

Medical marijuana is now used to treat many people, and as with any drug, physicians should educate patients about its use to ensure that it is taken appropriately and to their best benefit.