Last week, the New York State Department of Corrections announced an agreement to dramatically limit solitary confinement in its prisons. New York’s prison system will now be the largest in the country to stop using solitary as a punishment on prisoners younger than 18. Officials have also vowed to begin removing pregnant women and the developmentally disabled from extreme isolation and to begin cutting back the length of time prisoners may spend in solitary confinement. The agreement is just a first step toward reform in New York, but it’s still a human-rights victory. It’s also smart policy.

As we know from human-rights advocates, medical professionals, and psychiatrists—not to mention journalists—the human psyche cannot easily bear being locked in a cell the size of a bathroom for 22 to 24 hours a day. People in solitary confinement spend months, years, even decades of their lives with almost no social interaction. Prisoners with mental illness and young people in solitary confinement are much more likely to try to kill or harm themselves when they are held in solitary. Across the country, 80,000 people are held in these conditions, not because of extraordinary situations or major threats, but as a matter of course. It’s become standard correctional policy.

Clearly, spending weeks, months, or longer in solitary confinement causes psychological harm to the prisoners who must endure it. But at this point, the experiences of several states demonstrate much more: Solitary confinement is bad for everybody—taxpayers, communities, and corrections staff. Solitary increases the likelihood that a former prisoner, after release, will wind up back in prison. It is extremely expensive, costing as much as two or three times more to hold a prisoner in solitary confinement than in even a traditional maximum-security setting. And it exposes corrections systems to time-consuming and burdensome lawsuits. The commonplace reliance on solitary for prison discipline is a failed experiment, and it’s time for it to end.

Long-term solitary (often called “supermax”) is a vestige of the war on drugs that whipped lawmakers into a tough-on-crime frenzy during the 1980s and 1990s. As mass incarceration took root, politicians went too far, greenlighting the construction of entire prisons and new units within existing prisons whose express purpose was to house prisoners in solitary confinement for months and years at a time. They also invested enormous discretion in prison officials. Today, correctional officers in most states can place a prisoner in long-term isolation for essentially any reason. A minor infraction like being caught with too many postage stamps, refusing to return a lunch tray, or mouthing off at a guard, can land someone in solitary. Meanwhile, vulnerable prisoners, like children in adult facilities and transgender women in men’s facilities, are often placed in solitary confinement automatically, “for their own protection.”

Prison officials sometimes claim that solitary confinement is a tool for managing the uncontrollably violent, “the worst of the worst.” In reality, very few prisoners actually meet this description. Certainly, emergency situations may sometimes require the temporary isolation of a prisoner—in the immediate aftermath, say, of a serious fight. But when prisons use long-term solitary confinement as a matter of course, they go far beyond what’s necessary for safety, discipline, or any other legitimate purpose.

Indeed, evidence from several states suggests that the practice does not curb prison violence. One 2003 study found that the use of solitary confinement had no effect on prisoner-on-prisoner violence in Arizona, Illinois, and Minnesota. In the two years after Mississippi relocated a significant portion of its supermax population to the general prison population in 2006, researchers found that violent incidents dropped almost 70 percent.

If that sounds surprising, think about the other tools prison officials have to deal with infractions. A minor violation like refusing to follow an order, for example, could be punished by temporarily suspending commissary privileges. Even more serious violations, such as drug possession, should be addressed not with solitary confinement, which further harms vulnerable prisoners, but rather through efforts like drug rehabilitation and therapy. Recognizing these alternatives, corrections officials and academics alike are calling for an end to the practice.

Colorado, for instance, is dramatically reducing the number of prisoners in solitary confinement statewide, recognizing that a key component of reform is addressing mental illness in prisons. In the past year, the state has reportedly reduced the number of seriously mentally ill prisoners in solitary from 50 to four. By contrast, many state policies still provide for only minimal therapeutic programming in solitary confinement unit —a nonsensical approach for prisoners who supposedly lack life skills and exhibit serious behavioral problems.

If you’re not persuaded by the pragmatic or humane case for ending long-term solitary confinement, consider the financial one. Recent high-profile settlements have highlighted how costly harm to prisoners can be for corrections departments. The state of New Mexico, for example, recently settled the case of one man who was held in solitary confinement for two years for $15.5 million and settled another case, of a woman with bipolar disorder who spent most of her two years in jail in isolation, for $1.6 million. Even when prisoners don’t win in court, solitary confinement is hugely expensive, requiring a much higher staff-to-prisoner ratio. In nonsupermax prisons, prisoners cook, clean, and do the laundry. In a supermax, paid staff members provide all this labor. And any time a prisoner takes a shower or meets with his lawyer, he is generally escorted by two or three guards.

Then there’s the looming problem of the damage some prisoners scarred by solitary do when they get out. Last week, Colorado’s director of corrections, Rick Raemisch, published an op-ed in the New York Times describing the horrors of the night he (willingly) spent in supermax—and noting, soberly, that his predecessor as director of corrections, Tom Clements, was killed by a former prisoner who had been recently released directly from solitary confinement. “Whatever solitary confinement did to that former inmate and murderer,” Raemisch writes, “it was not for the better.”

Too true. A 2001 study of recidivism in Connecticut found that prisoners who had been held in solitary confinement were about 50 percent more likely to be rearrested within three years than those who had not. Another study found that former prisoners in Washington state who had spent three months or longer in solitary were not only more likely to reoffend but were much more likely to commit a violent crime. As Raemisch notes, only a small fraction of U.S. prisoners are serving life sentences. The vast majority will eventually be released. Prison officials have a duty to prepare them for jobs, family relationships, and other essential aspects of a normal life.

It’s for all of these reasons that some states have already begun to move away from the supermax. Massachusetts, Colorado, and New York have all taken steps to move prisoners with severe mental illness out of solitary confinement. Other states have made even broader reductions—last year, Illinois shuttered an entire supermax prison. Legislators in Texas, Colorado, and New Mexico have in the past three years passed bills calling for studies of the practice. Meanwhile, the federal Bureau of Prisons has been criticized for its use of solitary confinement, and the federal Immigration and Customs Enforcement agency recently passed a new directive requiring monitoring and imposing substantive limits on solitary’s use.

Earlier this week, the Senate Judiciary Committee held a hearing on solitary confinement. Democrat Dick Durbin and Republican Ted Cruz alike questioned witnesses on whether solitary confinement is overused for minor infractions and on whether prisoners are too often released directly from isolation. The answers are clear: yes and yes. We also know that solitary harms prisoners, serves no correctional purpose, costs too much, and leads to more crime. The punishment should be a temporary, last-resort, emergency measure. That’s the only legitimate use it has.