The opioid painkiller and heroin epidemic has led to a record number of deadly drug overdoses, with the US recording an all-time high of 52,000 overdose deaths — almost two-thirds of which were opioid-related — in 2015. In states like New Hampshire, the crisis is so bad that it's overtaken the economy and national security as voters' top concern.

But as awareness of the crisis grows, one of the more exotic policy ideas for dealing with the epidemic has gotten relatively little attention: legalizing medical marijuana.

The idea: Medical marijuana is an effective painkiller, so it can substitute some opioid painkillers that have led to the current overdose epidemic. And since marijuana doesn't cause deadly overdoses and is less addictive than opioids, replacing some use of opioids with pot could prevent some overdose deaths.

But this isn't just a theory. A growing body of research has supported the idea. It's not definitive research by any means. But with so many Americans dying from opioid overdoses each year, it certainly merits consideration by lawmakers who want to keep medical marijuana illegal at the federal and state levels.

Medical marijuana is an effective painkiller

To understand the opioid epidemic, it's crucial to understand that America has a pain problem. According to a 2011 report from the Institute of Medicine, about 100 million US adults suffer from chronic pain (such as lifelong back pain), more suffer only from acute pain (such as a temporary injury), and many of these cases go untreated. These are the kinds of figures doctors were worried about in the 1990s and 2000s when they began prescribing opioids at record numbers — by 2012, enough to give a bottle of pills to every adult in the country — and essentially caused the opioid epidemic.

Doctors generally did this with good intentions: They were misleadingly told by drug companies that opioids were both effective and had a lower risk of abuse than other painkillers on the market. So they thought they finally had their way to treat the US's pain problem without leading to addiction and overdoses.

Physicians were obviously wrong to believe that about opioids, and drug companies were wrong to mislead them. But the general point is they were trying to address a serious medical problem to the best of their abilities — a problem that remains to this day. The fact that opioids are now reviled as a result of the epidemic doesn't remove the underlying issue that tens of millions of Americans suffer from debilitating pain and doctors need a way to address that issue.

Well, medical marijuana appears to offer one way to help deal with America's pain problem without the risks of opioids.

The best review of the research to date on marijuana, published by the National Academies of Sciences, Engineering, and Medicine, looked at more than 10,000 studies to evaluate pot's potential benefits and harms.

Medical marijuana appears to offer one way to help deal with America's pain problem without the risks of opioids

The review concluded that there's strong evidence for marijuana as a treatment for chronic pain, as well as multiple sclerosis spasticity symptoms and chemotherapy-induced nausea and vomiting. The review also found strong evidence linking pot to respiratory problems if smoked, schizophrenia and psychosis, car crashes, lagging social achievement in life, and perhaps pregnancy-related problems — but it didn't find any good evidence that marijuana causes health complications, such as overdose, that can lead to death.

So the evidence suggests marijuana is good for treating chronic pain, even if it may come with some nonfatal risks.

What about opioids? While there is research that opioids effectively treat acute pain, the evidence on whether opioid painkillers can treat chronic pain is weak at best.

Opioids also produce much worse side effects than marijuana. For one, there's the very real risk of deadly overdose. And there's the risk of addiction: Not only can patients get addicted to opioid painkillers, but their addiction can, according to other research, lead to the use of heroin, an opioid that is cheaper, more potent, and deadlier than painkillers.

Marijuana could substitute opioids as a painkiller without any of these vicious side effects. Of course, pot wouldn't work for everyone — just as the effectiveness of medications for other types of health issues can vary from patient to patient. But it could possibly replace some opioid use, and that would prevent some opioid deaths.

That's not entirely hypothetical. A growing body of research shows that legalizing medical marijuana really does reduce the number of opioid deaths.

Medical marijuana legalization appears to lead to fewer opioid deaths

A 2015 paper from David Powell and Rosalie Pacula of the RAND Corporation and Mireille Jacobson of the University of California Irvine concluded, "Our findings suggest that providing broader access to medical marijuana may have the potential benefit of reducing abuse of highly addictive painkillers."

The researchers looked at both treatment admissions for opioid pain reliever misuse and state-level opioid overdose deaths. They found relative decreases in misuse and deaths in states with medical marijuana dispensaries, but they didn't find decreases in states that allow medical marijuana without dispensaries. So the big factor in reducing misuse and deaths seemed to be not just medical marijuana legalization but also access to medicinal pot through dispensaries.

The study also found that legal opioid painkiller distribution didn't seem to decline in states with pot dispensaries, which, according to researchers, suggests people are replacing illegally obtained opioids with pot. But the overall result is still less misuse and fewer deaths.

Pacula and Jacobson's research isn't the first to produce these kinds of results. A 2014 study, published in JAMA, found medical marijuana laws reduce opioid overdose deaths, although it was less rigorous than Pacula and Jacobson's analysis. And a 2016 survey from the University of Michigan found that chronic pain patients who used marijuana reported a 64 percent drop in opioid use.

The studies show a correlation, not causation. But given that medical marijuana and opioids can fill such similar roles, there's good reason to believe there's some causal connection in the data. So there's a solid empirical case that legalizing medical marijuana might literally save lives — by keeping people off opioids.

The research isn't perfect, but the opioid epidemic needs solutions now

A perfectly valid response to all of this is that the research isn't settled, and there haven't even been large-scale clinical trials that support medical marijuana — the same type of trials that are typically necessary to get medications approved by the Food and Drug Administration.

It is true that the research on medical marijuana could be more rigorous. The research review by the National Academies of Sciences, Engineering, and Medicine acknowledged as much, calling for more research into pot's benefits and harms. There should be more studies and large-scale clinical trials, especially if they can prove good ways to separate pot's psychoactive effects while keeping its maximum medical benefits — as low-THC, high-CBD strains of marijuana purport to do.

At the same time, there's a tremendous sense of urgency to the opioid epidemic. Tens of thousands of Americans are dying from opioid overdoses each year. In 2015, there were a record 52,000 drug overdose deaths in the US, nearly two-thirds of which were opioid-related, according to federal data.

Medical marijuana would not stop all of these overdoses, but it could help. At the very least, the idea merits consideration as the opioid epidemic calls for more attention.