OPIOID-USE disorder, the result of the misuse of drugs including heroin and prescription painkillers, is a well-studied medical condition. In the prison system, however, it isn’t always treated like one. Whereas jails in some parts of Britain offer effective treatment for opioid addicts, others run far more spartan regimes. This variation is endangering prisoners, who are frequently shuttled between the starkly different systems.

The Ministry of Justice is responsible for most aspects of prison policy in both England and Wales (Scotland and Northern Ireland have their own regimes). Matters of health, however, were devolved to the Welsh government in 1998. So whereas England’s National Health Service is in charge of health policy in English prisons, its rules do not cover Welsh jails.

In 2010 NHS England oversaw the launch of a drug-treatment programme in line with the most widely recommended method of treating opioid addiction. New prisoners are assessed for addictions on the day they are locked up. If found to be habitually using opioids, they are offered treatment in the form of low doses of methadone or buprenorphine, weak opioid substitutes that help users to taper off the stronger stuff.

The strategy is imperfect. The prescription of an opioid substitute can merely make the patient dependent on a different drug. But according to a report by the prisons inspectorate in 2015, the approach has “greatly improved drug treatment”. Overall, it found that “prison-based drug treatment services have improved dramatically in England over the past ten years.”

The Welsh system, however, provided “a considerably less safe service”. An updated report published on July 11th found that it “continued to create poorer outcomes.” Unlike English prisons, Welsh ones oblige opioid-dependent newcomers who have not already been prescribed opioids to withdraw from the drugs upon admission, and typically do not prescribe substitutes later in their sentence. The exception is Parc prison, in Bridgend, which is privately managed by G4S.

The symptoms from immediate opioid detoxification, which include nausea, shaking and abdominal pains, can last up to ten days. In October 2015 Benjamin Thomas couldn’t stand it that long. On the second day of his 20-week sentence, he hanged himself in his cell at Cardiff prison. He had not been offered opioid substitutes.

Another common withdrawal symptom is relapse itself. Studies have shown that patients pushed to quit before they are ready are likely to fall back into old habits. In prisons, this encourages the illicit drug trade and exposes users to needle-transmitted diseases such as HIV. Upon release, detoxed prisoners who have lost tolerance to drugs are more likely to overdose than those who have been maintained on opioid substitutes. Since 2009 Welsh jails have been giving departing prisoners Naloxone, an antidote for overdose, to curb this effect. But fatalities remain high.

English prisoners, who make up about 14% of inmates in Wales, may be most at risk. Inmates are constantly shuffled from prison to prison: last year there were more inter-prison transfers than there were individuals in the prison system. Those who move from an English prison to a Welsh one may find that they do not have the same access to opioid-replacement drugs.

The inspectorate has called for drug-treatment policy to be the same across the prison estate. But Wales shows little sign of changing. Its government has not provided specific funding for an English-style policy. Parliament’s Welsh Affairs Committee was told that the decision not to revamp the drugs programme was “based on funding”, according to Tonia Antoniazzi, a Labour MP on the committee. The cost of such frugality is prisoners’ health.