At a time when the government is trying to deal with a nationwide opioid epidemic, many jails are slow to help addicted inmates, only now beginning to roll out medicines to help them overcome their cravings. And most of those jails dispense only one of the available drugs.

According to Justice Department data from about a decade ago, nearly 1 in 5 jail and prison inmates across the country have used heroin or opioids, which makes jails a logical entry point for intervention.

Medication, when paired with counseling and social support, is considered the standard treatment for opioid addiction. Methadone and buprenorphine diminish withdrawal symptoms and reduce cravings. Naltrexone blocks the effect of opioids, can reduce cravings and also treats alcoholism.

About 220 of more than 3,000 jails nationwide offer naltrexone to inmates — mostly to those about to be released, said Andrew Klein, project director of a Justice Department program that supports agencies providing drug treatment for inmates. Only about 20 offer methadone or buprenorphine, he said. The numbers don’t include facilities that offer methadone for pregnant inmates.

Cost and a long-standing belief that abstinence is the best way to overcome addiction are barriers to using any type of medication to help treat opioid addiction, experts said. But addiction doesn’t go away just because someone isn’t regularly taking drugs, they said, and as a result, many addicted prisoners will start using again when they get out if they don’t get the right treatment.

In addition, the distribution of methadone and buprenorphine requires a special license that can be difficult for jail doctors to obtain. And, to be an effective long-term solution, those drugs should be continued after many of those who might receive them in jail are likely to be released. The transition to the outside can be complicated enough, and many inmates have little support after they are freed, experts say.

Those two medications also can induce mild opioid effects, which creates the potential for misuse and illicit sales even in the ostensibly controlled environment of a prison or jail. “They are very valuable commodities in jail,” Klein said.

Experts said treating opioid addiction behind bars could help address the broader opioid epidemic because inmates may be less likely to use such drugs or overdose on them after they get out. Some research has shown that providing medication is effective at reducing both the likelihood of relapsing on drugs and returning to jail. A small study on a medication-assisted program in Rhode Island found a 60 percent reduction in opioid overdose deaths among recently freed inmates

The jails in California’s San Mateo County, just south of San Francisco, began offering nal­trexone about 20 months ago. Jail officials say they believe the medication will improve patients’ chances of recovery once they are released and reduce the likelihood they will return.

“We want to use every tool in the toolbox,” said Akhil Mehra, a psychiatrist at the jails. “It’s not a panacea. . . . But when used appropriately, it can help people stay sober” after they are released.

The county also will continue to provide methadone to inmates if they were taking it before they were incarcerated. Buprenorphine is not offered in the jails, but health officials said they may do so in the future.

One of the San Mateo County inmates taking naltrexone is Rosa­maria Castillo, who has been in and out of jail more than two dozen times.

She admits to using drugs but said her primary addiction is to alcohol. Now serving time for public intoxication, Castillo said she is hopeful that anti-addiction medication will help curb her cravings when she gets out and make her more open to participating in other therapies.

“I want to get back on track, and I need all the help I can get,” Castillo, 60, said as she sat near her dorm-style cell. “I believe it can work for people who are really serious about wanting to get well.”

But Mehra said about half of the inmates evaluated for naltrexone decide not to take it because they are worried about side effects, which can include headaches, joint pain and upset stomach, or because they believe they can kick their habit without it.

Another San Mateo inmate, Rebecca Pro Compton, 32, said she had been in and out of recovery for methamphetamine and heroin abuse since she was a teenager.

Pro Compton said she sees naltrexone as just another drug — and a crutch. “As a drug addict, I don’t think it’s beneficial,” she said. Instead, Pro Compton was participating in a group therapy program called Choices.

Even some health workers are hesitant about dispensing medicines, including Adrian Maldonado, a program services manager at the San Mateo jails, who said he generally opposes the use of methadone and buprenorphine in jails because he thinks it merely replaces high-potency opioids with other drugs. He said naltrexone can work for some inmates but should be used only as a steppingstone to treatment that focuses on broader issues. “The goal is to help that person change their behavior,” he said.

One problem that can arise at facilities offering only naltrexone, or no addiction medication at all, is that new inmates who were taking opiates on the outside are suddenly forced to go cold turkey inside, putting them at risk of serious withdrawal symptoms.

Although few jails dispense medications to treat addiction, experts say they expect that to change over time. The American Society of Addiction Medicine and the American Correctional Association issued a joint statement in February supporting the use of medications behind bars and making specific recommendations on screening, treatment and release.

“Corrections [departments are] starting to understand [their] role in addressing this, and their role is huge,” said Kathleen Maurer, director of addiction services for the Connecticut Department of Corrections, who helped write the statement.

This story was produced by Kaiser Health News, an editorially independent project of the nonprofit Kaiser Family Foundation.