Federal Judge Keith Ellison had every right to be angry when he blasted the state on Friday for violating a settlement reached last year to stop putting inmates in hot prison cells, which the prisoners argued violated the Constitution’s prohibition of cruel and unusual punishment.

At least 22 people have died as a result of oppressive conditions at 15 state prisons since 1998, according to the Texas Department of Criminal Justice.

The settlement in a class-action case Ellison oversaw required the temperature be kept under 88 degrees inside the Wallace Pack Unit near Navasota. The agreement also said comparable conditions must be provided to any Pack inmates covered under the settlement who were transferred to a different prison.

That didn’t happen for 37 men recently transferred to the Richard LeBlanc Unit in Beaumont. Once again, they sweltered in a facility with a bad cooling system.

Ellison said the state had shown “negligible interest” in determining the conditions at LeBlanc before sending the inmates there despite available evidence that temperatures inside the prison exceeded those set forth in the settlement. He ordered the state to return the transferred inmates to Pack.

Worse than the state’s noncompliance with the settlement was its apparent effort to hide the truth.

Scott Medlock, an attorney for the inmates transferred to LeBlanc, said prison officials assured him that the prison’s cooling system “has been functioning properly and has maintained the temperature just below 85 degrees.” But 15 measurements taken during a subsequent site visit showed 14 areas above 90 degrees and one above 100.

Medlock said the thermostats on the LeBlanc air-conditioning units displayed only the set temperature. He said one thermostat read 30 degrees when the indoor heat index was 97 degrees.

The state assured Ellison that it was repairing the air conditioning at LeBlanc. But keep in mind those repairs are occurring only because the Pack Unit inmates covered under the court settlement were sent to LeBlanc. It’s likely that had those inmates not been transferred, stifling conditions there would have continued.

Texas operates more than 100 state prisons, jails and other facilities, with 10 more run by private operators. It’s a sure bet that the heat is just as oppressive inside many of those facilities.

Life-threatening conditions exist in Texas prisons because state officials aren’t fully committed to rehabilitating inmates. The TDCJ has programs that prepare inmates for their eventual return to society, but the effectiveness of those programs is blunted by the inhumane ways the prison system treats the incarcerated.

You can find dog pounds with better climate-control systems than some Texas prisons.

It’s not coddling inmates to provide cells that are heated and cooled properly. That cost is an investment in rehabilitation that can help reduce recidivism and lower the more than $3 billion this state spends annually to house the nation’s largest prison population.

Remember, too, that guards and other staff suffer as well when prison conditions are oppressive.

With the summer heat reaching triple digits this week, many Texans consider air conditioning a necessity. It’s worse inside prison. Inmates can’t leave to cool off at the mall or a movie theater. And when it gets too hot, people die.

Serving time shouldn’t be a death sentence for people who didn’t commit a capital offense. Texas needs to improve prison conditions that endanger people’s health.