NEW YORK -- Twelve years ago a federal judge called the practice of putting mentally ill prisoners in solitary confinement the equivalent of putting an asthmatic in a room with no air. Since then, lawsuits against corrections departments in at least 10 states have obtained court orders or settlements designed to keep the mentally ill out of solitary.

For example, a settlement in April after five years of litigation commits New York corrections officials to a number of concrete steps, including creation of a new residential mental health unit, that should dramatically decrease the number of prisoners with serious mental illness locked round-the-clock in their cells. And Massachusetts may be next: following the suicide of eleven prisoners in solitary in the last two and a half years, seven of whom were mentally ill, the Disability Law Center filed a lawsuit seeking an end to the solitary confinement of mentally ill prisoners for more than a week and the construction of a new secure treatment unit that would provide them with extensive out-of-cell activities.

Life in solitary can be tough for anyone, but for the mentally ill it can be torture. In solitary prisoners are locked in small, claustrophobic cells 24 hours a day with no more than an hour of exercise in a little barren cage outside the cell a few times a week. Inmates can spend years with scant interaction with staff and nothing to do, and both the isolation and idleness can exacerbate their symptoms. The cruelty is compounded because mental health services for segregated prisoners typically consist of little more than medication and brief cell-front checks-ins by mental health staff.

Untreated or under-treated, the mentally ill may deteriorate. They may rant and rave, babble incoherently or huddle silently. They may talk to invisible friends and live in worlds constructed of hallucinations. They may self-mutilate until their bodies are riddled with scars. Many try suicide; some succeed.

Devastating as solitary may be for them, mentally ill prisoners are disproportionately represented in segregation units, punished and isolated for behavior that may be caused or heavily influenced by their illness. Indeed, prisoners with mental illness are less able than other prisoners to adjust to prison life. They are more likely to break the rules through disruptive, belligerent, or aggressive behavior. They are more likely to be victimized and more likely to be injured in a fight. They may suddenly without warning refuse to follow straightforward orders to come out of a cell, stand up for the count or take a shower. They are more likely to behave in ways that annoy, disgust and even enrage security staff who have scant training in how to recognize, much less cope with, symptoms of mental illness.

Men and women with serious mental illness may be ill equipped for prison, yet their numbers behind bars are soaring. Nationwide half of all prison inmates have a mental health problem, according to a 2006 federal report. Thirty percent of prisoners are estimated to have major depression and 15 percent may have a psychotic disorder. Prisons house three times more people with serious mental illness -- such as schizophrenia, and bipolar disorder -- than do mental health hospitals.

There is something painfully awry when institutions set up for punishment and control are asked to take care of the mentally ill. The nation used to lock its mentally ill in asylums. Now it stows them in prison.

Corrections officials can and should keep mentally ill prisoners out of segregation. But they cannot keep the mentally ill out of prison in the first place. That is a challenge for elected officials,. They must reform crippled community mental health systems that fail the poor and homeless, and they must reform unduly harsh laws that send low level nonviolent offenders to prison. The mentally ill do not have to end up in prison, but they will until public officials show far more common sense and compassion than they have to date.