The U.S. is in the grip of an opioid-addiction epidemic, yet 80 percent of people who are dependent on heroin or painkillers are not getting treatment, according to a new research letter published today in the Journal of the American Medical Association.

Over the past decade, deaths from overdoses of heroin have quadrupled, according to the CDC, and deaths from prescription painkillers have doubled. The two trends are related: Patients who became hooked on prescription painkillers when the drugs were being heavily marketed in the 1990s have been switching to heroin, which is cheaper and easier to access in some areas. Three in 1,000 Americans reported having used heroin in 2013.

For the study, researchers from the Johns Hopkins Bloomberg School of Public Health analyzed data from 6,770 people who reported on the National Survey of Drug Use and Health that they were either dependent on opioids or that the drugs' use was causing problems in their lives.

The study found that the most common treatments for opioid addiction are self-help groups and outpatient methadone clinics. The authors also found that many places lack sufficient drug-treatment programs, and only 22 percent of addicts received any kind of treatment in the 2009-2013 survey period. Their findings echo a March study that found that because of a lack of capacity, there are nearly a million opioid addicts who would not be able to access treatment, even if they wanted to.

What's more, some state Medicaid programs restrict access to methadone, naltrexone, and buprenorphine, three drugs that ease opioid withdrawal. In 2013, the final year of the data that the authors of the JAMA study examined, the American Society of Addiction Medicine found that only 28 states covered all three drugs on their Medicaid programs, according to Stateline, and some of those who do cover the drugs require prior authorizations and impose lifetime limits.

The treatment limitations may make life particularly difficult for people in states whose laws take a punitive stance toward drug addiction. For example, only 22 states and the District of Columbia have what are called “911 immunity” measures, which protect people who call 911 after experiencing or witnessing an overdose from facing criminal charges. As I reported earlier this year, 18 states consider using drugs during pregnancy to be child abuse.

Johns Hopkins professor Brendan Saloner, an author of the JAMA study, said in a statement that not only should states increase treatment access, they should also fight stigma against addicts. Saloner called opioid addiction “a chronic relapsing illness, just like diabetes.”

“Referring to drug users as junkies or criminals keeps people with addiction in the shadows and away from getting help,” he said. “They may be open to treatment, but they never seek it out.”