“This is a new day in Texas prison history.”

With those words Tuesday, U.S. District Judge Keith Ellison ended a years-long lawsuit over prison heat conditions and finalized a settlement proposal that includes permanently installing air conditioning at the Wallace Pack prison southeast of College Station.

In 2014, several inmates at the prison sued the Texas Department of Criminal Justice over the lack of air conditioning, citing nearly two dozen prisoners who died from heat stroke in the last two decades and temperatures at the unit which routinely exceeded 100 degrees. Of Texas' more than 100 state prisons and jails, nearly 75 percent are uncooled in inmate housing areas.

For years, the state fought back against the suit, claiming it took adequate measures to deal with the sweltering Texas summers, like providing ice water and fans. But their arguments didn’t sway Ellison, who issued a sharp ruling last year, saying the department was deliberately indifferent to the harm it was causing inmates and ordering the state to place medically vulnerable inmates in air conditioned units.

The Texas Tribune thanks its sponsors. Become one.

What followed was a massive shuffle of men in state prison custody as more than a thousand inmates who were deemed vulnerable — like the elderly and those with heart conditions — were moved to air conditioned prisons.

It was a temporary solution. In February, the parties announced they had come to a settlement agreement, which includes air-conditioning the Pack Unit permanently — pending legislative approval — and ensuring the more than 1,300 inmates who are part of the class-action lawsuit stay in air-conditioned prisons and jails throughout their incarceration. The department installed temporary air conditioning at the unit this year to cover the next two summers.

The department said in a statement before the hearing Tuesday that the settlement will provide additional safeguards for inmates at the Pack Unit, but that it also sets up a process in the future to identify inmates who may be medically sensitive to heat and house them in one of the agency’s 32,000 air-conditioned beds.

Jeff Edwards, the inmates’ attorney in the lawsuit, said that he hopes TDCJ will move forward with protecting those housed outside of the Pack Unit as well, if only to protect themselves from future litigation at other prisons.

Ellison had already preliminarily approved the settlement in March, but Tuesday’s hearing in Houston allowed objections from inmates who are part of the lawsuit before Ellison gave his final stamp of approval. Men called in from various prisons to object to the settlement’s reassessment of who qualifies for a cool prison bed under the lawsuit and question their ability to sue for damages since the department doesn’t admit to any wrongdoing in the settlement.

Many inmates who were evacuated from coastal prisons during Hurricane Harvey landed at the Pack Unit and were initially rolled in as part of the lawsuit. But in the settlement, only inmates currently at the prison and those who were there before the court-mandated relocation last year qualify for relief.

The Texas Tribune thanks its sponsors. Become one.

Keith Cole, the first of the six original plaintiffs, was the only one to not sign onto the settlement proposal, and he was vocal in his dissent at the hearing. After another inmate said during the hearing that his granted parole was revoked in retaliation because of the lawsuit, Cole reacted.

“Our attorneys positively, absolutely stated that they were going to add a clause in the settlement about retaliation, but it’s not there,” he said.

Ellison listened to the complaints in turn, but in the end said this was a better deal than could have been expected.

“It’s clear to me that neither side got everything they wanted, but … what they did get deserves our tribute,” he said.

With that, the settlement was finally approved by the ecstatic judge, who has applauded the lawyers on both sides for reaching an agreement and said he had thought the case would stretch out into the next decade.

“I never dreamt we’d get the Pack Unit air-conditioned,” Ellison said. “I think it’s going to endure for generations of prisoners.”

Read related Tribune coverage: