Jail can be a necessary, maybe the only, lever with which to encourage or force an addict who has been locked up to seek treatment before it’s too late. “People don’t go to treatment because they see the light,” said Kevin Pangburn, director of Substance Abuse Services for the Kentucky Department of Corrections. “They go to treatment because they feel the heat.”

Jail may in fact be the best place to initiate addict recovery. It’s in jail where addicts first come face-to-face with the criminal-justice system, long before they commit crimes that warrant a prison sentence. Once in custody and detoxed of the dope that has controlled their decisions, it’s in jail where addicts more clearly behold the wreckage of their lives. And it is at that moment of clarity and contrition when they are typically plunged into a jailhouse of extortion, violence and tedium.

“Imagine your most stressful day at work, multiply that by two or three, then imagine that every day,” a Kenton County inmate said. “Having to be on your guard. Always tense. Then you’re released from that. The first thing you’re going to take up is heroin” again.

In the red state of Kentucky, a relentless opiate-addiction epidemic is changing long-held dogma about how to deal with addicts. Families who once supported a “throw away the key” approach to addiction are thinking differently now that their loved ones are strung out. Kentucky is also the only state that elects its jailers. This gives them more autonomy than their counterparts elsewhere. It also inspires more budgetary accountability to voters, and thus an acute awareness of the costs of cycling inmates in and out and back in again.

Kenton County is among the latest of two dozen Kentucky county jails that have started full-time “therapeutic communities” aimed at rehabilitation within their walls, providing inmates the services that private treatment centers offer on the outside. Much of the impetus has come from the state’s Department of Corrections, which a decade ago began transitioning its prisons away from pure lockups to providing drug treatment.

With the state’s epidemic of addiction, and $3 million that state legislators approved for substance-abuse treatment in 2015, Kentucky has become a center of experimentation in a new way of doing jail.

Terry Carl, the Kenton County jailer, is a Vietnam veteran, Navy reservist, former operations manager for a local utility and a Republican — hardly a wild-eyed social experimenter.