Rules are displayed on a medication cart at the Androscoggin County Jail in Auburn in this Feb. 17, 2016, file photo.

Last week, an award-winning Maine teacher was given a suspended sentence for several incidents of shoplifting. The prosecutor had asked for jail time as a deterrent to future crimes.

The judge settled on the lighter sentence because of Nancie Atwell’s mental illness.

“If the court doesn’t recognize mental illness in this case, the court is in some sort of alternate reality,” Judge Paul D. Matthews said in sentencing Atwell. “This is about a woman who was in some type of crisis … which, I think it’s clear, she has attempted to deal with, hopefully effectively.” Atwell, 67, of Southport won a $1 million Global Teacher Prize in 2015.

Matthews was clear that he gave strong consideration to Atwell’s mental state and her contribution to her community through the Center for Teaching and Learning, which she founded, in determining his sentence, which includes community service.

Considering mitigating circumstances, such as a defendant’s life and health history, is the standard, set in law, for sentencing all criminal defendants. However, this standard is unequally applied, as evidenced by the unacceptably high number of jail inmates with mental illness and substance abuse disorders.

Many of these defendants are poor and can’t afford a high-priced defense attorney. Nor can they afford or access mental health or substance abuse treatment.

This makes it incumbent upon the state to ensure that all defendants are treated equally. That mental illness and other factors are taken into consideration when they are on trial, and if found guilty, at sentencing.

In 1983, about 6.4 percent of the U.S. prison and jail population had a serious mental illness. That figure has increased substantially. More than a third — 37 percent — of federal prisoners had been diagnosed with a mental health disorder, according to a 2017 publication by the Bureau of Justice Statistics. Nearly a quarter were told they had a major depressive disorder; 18 percent were diagnosed as bipolar.

The numbers were even higher for jail inmates, with 44 percent told they had a mental health disorder.

Maine’s situation, recently chronicled by the Bangor Daily News in 2016, is sadly not unusual.

Although there are no records or systems that track the mental health of inmates in Maine, the state does track use of medication to treat mental health. According to data from the Department of Corrections’ contracted medical provider, Correct Care Solutions, about 48 percent of juveniles and 34 percent of adult inmates were prescribed psychiatric medications in 2015. The numbers are much higher in some county jails, according to a 2015 survey conducted by the Bangor Daily News. The survey found that 61 percent of inmates at the York County Jail were receiving such medications.

America’s jails and prisons have become de facto mental health facilities. More than three times as many seriously mentally ill Americans are in jails and prisons than they are in hospitals, according to a 2010 study done for the National Sheriff’s Association and Treatment Advocacy Center.

This situation won’t be quickly remedied. But, ensuring mental health is considered in sentencing all defendants would be a good start. Directing these people to treatment, instead of or in connection with incarceration, would be even better.