COLORADO SPRINGS — For years, the Colorado corrections system had a ready answer for inmates it wanted to punish. For almost any reason — smuggling drugs, talking back to a corrections officer, assaulting another prisoner — it would send an inmate to a cell the size of a parking spot. The inmate would stay there, alone, at least 22 hours a day, for two and a half years on average, but sometimes for decades. This is called administrative segregation, and shortly after I became Colorado’s head of corrections in 2013, I began to ask why we were doing it. Can you imagine spending years without having regular social interactions or without full access to basic human activities like showering and exercising? When did it become O.K. to lock up someone who is severely mentally ill and let the demons chase him around in the cell? What is wrong with us? I asked. Then, in 2015 I assisted the State Department with other United Nations countries in modernizing international standards for the treatment of prisoners, now known as the Nelson Mandela Rules. During the debates about the wording of the new standards, it was decided that keeping someone for more than 15 days in solitary was torture. After listening and being involved in those discussions, I agreed. There now is enough data to convince me that long-term isolation manufactures and aggravates mental illness. It has not solved any problems; at best it has maintained them. That’s why, in September, Colorado ended the practice. Inmates who commit serious violations like assault will now spend at most 15 days in solitary, and, if necessary, undergo therapy or anger management classes afterward. Today, there are only 18 inmates in such segregation, and we deal with minor offenses like mouthing off in less severe ways. Long-term solitary was supposed to be rehabilitative, but it did not have that effect. Studies have found that inmates who have spent time in solitary confinement are more likely to reoffend than those who have not. Data shows that prisoners in solitary account for about half of all prison suicides; self-harm is also more common in solitary units than in less-restrictive ones. One social psychologist even found that the degree of loneliness experienced by people in solitary is matched only by that of terminal cancer patients. In addition, solitary confinement was intended to be a last resort for those who were too violent to be in a prison’s general population. But then we gradually included inmates who disrupted the efficient running of an institution. In other words, inmates could be placed in solitary for almost any reason, and they were. But this transformation created consequences we didn’t foresee. My predecessor, Tom Clements, was assassinated in 2013 by a former inmate who had been released directly into the community after having spent seven years in solitary. Mr. Clements had worked to reform Colorado’s overuse of solitary when he was murdered by the kind of person he was trying to help. Gov. John Hickenlooper hired me to continue Mr. Clements’s work. Just six years ago, 1,500 inmates, or almost 7 percent of the prison population, were housed in solitary on any given day. When I arrived in 2013, there were still over 700 inmates in solitary, some of whom had been there for years. Approximately half of them were still being released directly into the community without being reintegrated. Now inmates are no longer placed in long-term isolation, nor are any inmates released directly from solitary. My staff relayed stories to me that were simply unbelievable. I was told of instances where two corrections officers would remove an inmate from solitary after years of involuntary isolation. Then they would place him on a city bus, remove the cuffs and shackles from his arms and legs, and leave him on his own. How did we ever accept this as good practice? Would you want to live next to one of those former inmates? I surely wouldn’t. I became convinced this practice was a contradiction of our mission of public safety and felt even more so after I spent 20 hours in solitary confinement myself. Experiencing solitary firsthand, I thought, would better position me to change our culture. If I was troubled by the experience after such a relatively short time, then I had to say, “Enough.” Not everyone agreed with my new policy. But the corrections officers who had initially opposed it changed their minds after they began to see positive results. I’ve seen and been told that the corrections officers are interacting with the inmates in a more positive manner. It is time for this unethical tool to be removed from the penal toolbox. Colorado has ended long-term solitary because the state has developed alternatives to its use. We have done this not only to fulfill Mr. Clements’s vision, but also because since over 95 percent of all inmates eventually leave prison, it is simply the right thing to do — for the inmates and for their communities.