SHIRLEY SCHMITT is no one’s idea of a dangerous criminal. She lived quietly on a farm in Iowa, raising horses and a daughter, until her husband died in 2006. Depressed and suffering from chronic pain, she started using methamphetamine. Unable to afford her habit, she and a group of friends started to make the drug, for their own personal use. She was arrested in 2012, underwent drug treatment, and has been sober ever since. She has never sold drugs for profit, but federal mandatory minimum rules, along with previous convictions for drug possession and livestock neglect, forced the judge to sentence her to ten years in prison. Each year she serves will cost taxpayers roughly $30,000—enough to pay the fees for three struggling students at the University of Iowa. When she gets out she could be old enough to draw a pension.

Barack Obama tried to reduce the number of absurdly long prison sentences in America. His attorney-general, Eric Holder, told federal prosecutors to avoid seeking the maximum penalties for non-violent drug offenders. This reform caused a modest reduction in the number of federal prisoners (who are about 10% of the total). Donald Trump’s attorney-general, Jeff Sessions, has just torn it up. This month he ordered prosecutors to aim for the harshest punishments the law allows, calling his new crusade against drug dealers “moral and just”. It is neither.

More is not always better

Prisons are an essential tool to keep society safe. A burglar who is locked up cannot break into your home. A mugger may leave you alone if he thinks that robbing you means jail. Without the threat of a cell to keep them in check, the strong and selfish would prey on the weak, as they do in countries where the state is too feeble to run a proper justice system.

But as with many good things, more is not always better (see article). The first people any rational society locks up are the most dangerous criminals, such as murderers and rapists. The more people a country imprisons, the less dangerous each additional prisoner is likely to be. At some point, the costs of incarceration start to outweigh the benefits. Prisons are expensive—cells must be built, guards hired, prisoners fed. The inmate, while confined, is unlikely to work, support his family or pay tax. Money spent on prisons cannot be spent on other things that might reduce crime more, such as hiring extra police or improving pre-school in rough neighbourhoods. And—crucially—locking up minor offenders can make them more dangerous, since they learn felonious habits from the hard cases they meet inside.

America passed the point of negative returns long ago. Its incarceration rate rose fivefold between 1970 and 2008. Relative to its population, it now locks up seven times as many people as France, 11 times as many as the Netherlands and 15 times as many as Japan. It imprisons people for things that should not be crimes (drug possession, prostitution, unintentionally violating incomprehensible regulations) and imposes breathtakingly harsh penalties for minor offences. Under “three strikes” rules, petty thieves have been jailed for life.

A ten-year sentence costs ten times as much as a one-year sentence, but is nowhere near ten times as effective a deterrent. Criminals do not think ten years into the future. If they did, they would take up some other line of work. One study found that each extra year in prison raises the risk of reoffending by six percentage points. Also, because mass incarceration breaks up families and renders many ex-convicts unemployable, it has raised the American poverty rate by an estimated 20%. Many states, including Mr Sessions’s home, Alabama, have decided that enough is enough. Between 2010 and 2015 America’s incarceration rate fell by 8%. Far from leading to a surge in crime, this was accompanied by a 15% drop.

America is an outlier, but plenty of countries fail to use prison intelligently. There is ample evidence of what works. Reserve prison for the worst offenders. Divert the less scary ones to drug treatment, community service and other penalties that do not mean severing ties with work, family and normality. A good place to start would be with most of the 2.6m prisoners in the world—a quarter of the total—who are still awaiting trial. For a fraction of the cost of locking them up, they could be fitted with GPS-enabled ankle bracelets that monitor where they are and whether they are taking drugs.

Tagging can also be used as an alternative to locking up convicts—a “prison without walls”, to quote Mark Kleiman of New York University, who estimates that as many as half of America’s prisoners could usefully be released and tagged. A study in Argentina finds that low-risk prisoners who are tagged instead of being incarcerated are less likely to reoffend, probably because they remain among normal folk instead of sitting idly in a cage with sociopaths.

Justice systems could do far more to rehabilitate prisoners, too. Cognitive behavioural therapy—counselling prisoners on how to avoid the places, people and situations that prompt them to commit crimes—can reduce recidivism by 10-30%, and is especially useful in dealing with young offenders. It is also cheap—a rounding error in the $80 billion a year that America spends on incarceration and probation. Yet, by one estimate, only 5% of American prisoners have access to it.

The road to rehabilitation

Ex-convicts who find a job and a place to stay are less likely to return to crime. In Norway prisoners can start their new jobs 18 months before they are released. In America there are 27,000 state licensing rules keeping felons out of jobs such as barber and roofer. Norway has a lower recidivism rate than America, despite locking up only its worst criminals, who are more likely to reoffend. Some American states, meanwhile, do much better than others. Oregon, which insists that programmes to reform felons are measured for effectiveness, has a recidivism rate less than half as high as California’s. Appeals to make prisons more humane often fall on deaf ears; voters detest criminals. But they detest crime more, so politicians should not be afraid to embrace proven ways to make prison less of a school of crime and more of a path back to productive citizenship.