Inmates in one of Texas’ sweltering prison units scored a legal victory today in their fight to combat what they say is cruel and unusual punishment.

U.S. District Judge Keith Ellison in Houston gave Texas prison officials two weeks to lower the temperature inside the Pack Unit in Central Texas to 88 degrees for heat-sensitive inmates, or move them elsewhere.

This is the same prison unit WFAA told you about last summer, when the same judge ordered the prison to provide inmates clean water after tests showed the unit’s supply was tainted with arsenic. Drinking water was one of the ways prison officials told inmates to deal with the heat. A United Nations report criticized Texas over the hot conditions.

Ellison said inmates have a right, under the U.S. Constitution, to be free from “cruel and unusual” punishment, and found the Pack Unit in violation.

“To deny modern technology to inmates today for the simple reason that it was not available to inmates in past generations is an argument that proves too much,” Ellison wrote in his ruling Wednesday. “No one suggests that inmates should be denied up-to-date medical and psychiatric care, or that they should be denied access to radio or television, or that construction of prison facilities should not use modern building materials. The treatment of prisoners must necessarily evolve as society evolves.”

On Wednesday, Texas Attorney General Ken Paxton slammed the judge’s ruling, vowing to appeal.

“The judge’s ruling downplays the substantial precautions TDCJ already has in place to protect inmates from the summer heat,” Paxton said in a statement. “Texas taxpayers shouldn’t be on the hook for tens of millions of dollars to pay for expensive prison air conditioning systems, which are unnecessary and not constitutionally mandated. We’ll appeal the decision and are confident that TDCJ is already doing what is constitutionally required to adequately safeguard offenders from heat-related illnesses.”

Judge Ellison visited the Pack Unit before ruling against the state. Temperatures routinely climb to more than 100 degrees in the summer inside the unit and the dozens of others in the state’s sprawling prison system.

More than 20 inmates have died in recent years from the heat. Texas prison officials say a system of fans, cold water and cold showers are available to inmates to help them survive the heat. Earlier this summer, inmates testified in a hearing in Ellison’s court that they are often denied these remedies. They said that even when available, they still do little for heat-sensitive inmates vulnerable to the blistering temperatures.

The judge’s ruling does not mandate system wide air conditioning and chilly 70-degree temperatures for the Pack Unit, only that the state get parts of the facility down to 88 degrees.

“As Dostoyevsky said more than 150 years ago, ‘The degree of civilization in a society can be judged by entering its prisons,’” the judge wrote. “Prisoners are human beings with spouses and children who worry about them and miss them. Some of them will likely someday be shown to have been innocent of the crimes of which they are accused. But, even those admittedly guilty of the most heinous crimes must not be denied their constitutional rights. We diminish the Constitution for all of us to the extent we deny it to anyone.”