THE war on drugs is at last subsiding. A growing gang of both rich and poor countries are choosing to tolerate or even legalise drugs that they once tried to suppress with force. And many of the calls for a ceasefire are coming from unexpected places. The main moves to allow people to use cannabis have been in America, which was long the world’s chief cheerleader for prohibition. This week Mexico’s supreme court opened the door to legalising marijuana. Even more surprising is conservative Ireland, a country that still outlaws abortion, which announced plans to permit some consumption of heroin. The Irish plan would establish “medically supervised injecting facilities”—better known as shooting galleries—where heroin addicts can take their drugs, using clean equipment, under doctors’ supervision. This will reduce the dreadful harm done by heroin to its users and to society, which suffers from the crime that always goes hand in hand with such an addictive and expensive drug. But regulating how heroin is consumed ought to be just the first step. Next, Ireland and others should muscle in on the supply of the drug itself.

Beat them at their own game

After a decline in the 1990s, heroin has come roaring back. The dishing-out of prescription painkillers earlier this century got millions in the West hooked on opioids; a tightening-up of the rules then sent them looking for substitutes. The heroin dealers were waiting. In America, where this trend is most acute, the number of annual users has almost doubled in the six years to 2013; overdoses have risen faster still (see article).

Shooting galleries are a proven way to reduce the health risks to those who have fallen into this trap. Seven countries in Europe already run them, as do Australia and Canada. The unsurprising evidence is that if you are going to fill your veins with a dangerous drug, you are better off with a doctor on hand. In Sydney the number of local ambulance call-outs for overdoses fell by 80% in the places where shooting galleries opened. In Madrid the use of clean needles increased, cutting the risk of blood-borne infection. Everywhere they have given the authorities an opportunity to coax hard-to-reach addicts into treatment, the best chance of getting clean. Contrary to the fears of their detractors, the galleries do not seem to encourage more people to take up the habit.

The weakness of consumption-rooms is that most of them, including the ones proposed in Ireland, operate on a “bring your own” basis, so the heroin consumed in them is the illegal sort. This means that drug-takers still risk overdosing on impure or unusually strong stuff bought on the street—a serious risk with heroin, where the difference between an effective dose and an overdose is wafer-thin. Just as bad, it means that the heroin market, thought to be worth more than $50 billion a year worldwide, remains in the hands of criminals. Addicts still rob, burgle and sell their bodies to pay for their habits; the profits still go to local gangsters—and in turn to everyone from the Sinaloa cartel to the Taliban.

The state should snatch this market back. A handful of European countries have experimented with providing not just safe facilities in which to take drugs, but also prescribing unadulterated, free heroin itself. The policy makes drug-taking as safe as it can ever be (the medical-grade diamorphine given out is the stuff women receive in labour), while robbing dealers of their best clients. This brings the greatest pay-off of all: fewer people taking up the ruinous drug in the first place. With free heroin available on prescription, dealers cannot make a living selling the stuff and so they give up the trade. After Switzerland introduced such a programme, heroin became much harder to buy on the street; in Zurich the number of new addicts fell from 850 in 1990 to 150 in 2005.

Persuading voters to finance rationed, state-sanctioned narcotics is not easy. Britain shut its small heroin-prescription scheme earlier this year, despite studies showing that it was more effective than the methadone programme it replaced. But if governments really want to limit the harm from drugs —saving addicts’ lives, crushing dealers’ profits and slashing the number of people who take them in the first place—then they must seize control of the market themselves.