In other words, these were discarded people who could be made to bear the brunt of this brutal law without risk of public backlash. Among the more horrifying cases investigated by the Three Strikes Project is that of 55-year-old Dale Curtis Gaines, who suffers from both mental retardation and mental illness. He has never committed a violent crime, but is serving a life sentence for receiving stolen property. His first two strikes, daytime burglaries of empty homes during which he was unarmed, appear to have involved thefts valued at little more than pocket change.

According to court documents, Mr. Gaines’s early childhood was a nightmare, filled with the most savage forms of abuse. His grandmother, a primary care giver, is said to have beaten him when he urinated or defecated in bed — and forced him to eat his feces as punishment. Later, as often happens with mentally impaired adolescents, he began to skip school because he was ashamed that he could not keep up with his classmates. He was often homeless. While serving time for his second crime, he was diagnosed by the prison system itself as both mentally disabled and schizophrenic.

He was clearly too impaired to help with his defense, and at one point simply put a blanket over his head and declined to speak to a doctor who was questioning him. His ability to read is comparable to that of a kindergartner.

At the time of his third strike, for receiving stolen computer equipment, Mr. Gaines was getting Social Security and disability benefits because of mental illness and retardation. His mental health history, readily available in the prison record, would probably have been recognized as a mitigating factor and prevented him from being so harshly sentenced. But, according to court documents, his public defender presented no evidence about his disability.

In 2010, 12 years after Mr. Gaines was convicted, the prosecutor who handled the case but by then had left the district attorney’s office wrote to him in prison, expressing regret and offering help if he wished to appeal. The Stanford students also noticed his case and are now trying to free him.

Mr. Gaines’s story is not unique. And as more cases unfold in court, judges, lawyers and Californians should look back with shame at the injustice the state inflicted on a vulnerable population that often presented little or no danger to the public.