It's no secret the legalization of medical marijuana has been a controversial subject as of late.

But what if medical marijuana could help curb the epidemic of opioid addiction that affects more than 2.5 million Americans and was responsible for more than 30,000 overdose deaths in 2015? A growing number of experts in the medical community are starting believe medical marijuana has the potential to do just that — and their beliefs are increasingly being backed by science.

A recent study published is Trends in Neuroscience by Yasmin Hurd, professor of neuroscience, psychiatry and pharmacology and systems therapeutics at the Icahn School of Medicine at Mount Sinai in New York, found that marijuana can reduce the cravings of an opioid addict.

In the study, Hurd studied the effects of a particular nonpsychoactive marijuana extract known as cannabidiol in humans and rodents. In both subjects, cannabidiol helped relieve anxiety for weeks after opioid ingestion, which led to fewer cravings for opioids overall.

Opioids have been prescribed abundantly to treat both acute and chronic pain, but the effectiveness of opioids for treating chronic pain has come under fire since the onset of the opioid epidemic in the early 2000s. Doctors were chastised in the media and eventually by the U.S. surgeon general for the overprescription of a drug with addictive properties.

Despite the high rate of abuse, opioids are still being prescribed by health professionals at a rapid rate. In fact, more than 200 million opioid painkiller prescriptions are written in the United States every year. If researchers can provide enough evidence that medical marijuana is effective in the treatment of chronic pain, more states may be willing to legalize marijuana for medical purposes regardless of political climate.

So far, 28 states and Washington, D.C., have legalized medical marijuana. These areas have observed a decrease in opioid overdoses and opioid prescriptions, suggesting that patients may be turning to marijuana instead.

A recent study in The Journal of Pain suggests that chronic pain patients actually prefer marijuana to opioids. Subjects in the University of Michigan study reported fewer side effects, an overall better quality of life and a decrease in opiate usage. Additional studies that support these findings will be needed, however, before the medical community can form a strong case for the use of medical marijuana and its derivatives in treating pain.

Studies on marijuana's efficacy in treating pain are easier to conduct in states where medical marijuana has been legalized. In Connecticut, where medical marijuana is legal, Dr. James Feeny is leading a trial to study the effects of opioids on acute pain. Most of the previous studies conducted on marijuana and pain have found that marijuana can treat chronic pain, but Feeny believes marijuana can also be used to treat acute pain defined as pain that lasts less than three to six months such as the pain patients experience after surgery.

Fenny observed that when he tried to prescribe his patients opioids, they often refused it and explained that they would use marijuana for pain management instead. If the results of the study prove that marijuana can be an effective substitute for opioids in the treatment of acute pain, patients may one day be able to choose between marijuana and opioids to treat their pain.

But how exactly do cannabinoids like cannabidiol alleviate pain? Cannabidiol, unlike THC, does not get the user high. Scientists have observed that cannabidiol does reduce pain in a number of studies, but the mechanism by which it relieves pain is unclear.

More scientific studies are needed in order to determine why and how cannabidiol works to relieve pain and anxiety, but the fact that cannabis itself is still recognized as a Schedule I drug by the Drug Enforcement Administration makes obtaining the drug for research purposes a challenging task.

Researchers must apply for a license to obtain the marijuana, which can take up to one year. After receiving the license, marijuana can only be obtained from one federally regulated marijuana farm at the University of Mississippi. Because the university only grows certain strains of marijuana, the studies even licensed researchers can perform are limited.

Marijuana and its derivatives have long been used to treat pain, but with fewer addictive properties than opioids and more researchers invested in studying the science behind how it treats pain, cannabinoids have the potential to go beyond just treating the symptoms of opioid addiction. If researchers can compile enough scientific evidence, marijuana could one day become an alternative to narcotic treatment for pain.