After settling a costly legal fight over installing air conditioning in a notoriously hot Texas prison, the state's corrections department has drastically slashed the estimated cost to permanently cool it.

At a committee hearing Wednesday at the Texas Capitol, Texas Department of Criminal Justice Executive Director Bryan Collier said the estimated cost to install permanent air conditioning at the Wallace Pack Unit near College Station is now about $4 million. In 2017, amid a years-long federal lawsuit over what a judge ruled were unconstitutional conditions in the prison, an expert obtained by the department said the cost would be more than $20 million.

Before settling the lawsuit, the department conducted its own research and the cost dropped to $11 million, but Collier said in Wednesday's hearing that number had dropped even further after the state comptroller's office said some construction upgrades weren't necessary. The state spent more than $7 million on the lawsuit over installing air conditioning in the Pack Unit's housing area.

As a result of the lawsuit, the department also has asked the Legislature for funds to install air conditioning at the Hodge Unit in East Texas, which houses developmentally disabled inmates, for an estimated $2 million, Collier said. Another $3 million has been requested to enhance security at some air-conditioned lockups so higher-level security inmates who are medically vulnerable can be moved to cooler beds.

The Texas Tribune thanks its sponsors. Become one .

In 2014, several Pack inmates sued the department, claiming the lack of air conditioning in the Pack prison was unconstitutional. They pointed to at least 23 prisoner deaths in Texas from heat stroke since 1998, 10 of which occurred in the heat wave of 2011.

The department fought the lawsuit for years, saying the cost was too burdensome and their mitigation efforts against heat, like providing ice water and allowing personal fans, sufficiently countered the stifling temperatures. After a landmark ruling requiring air conditioning for vulnerable inmates last year, Texas Attorney General Ken Paxton said “taxpayers shouldn’t be on the hook for tens of millions of dollars to pay for expensive prison air conditioning systems.”

In February, the department and the inmates announced a settlement, and the prison agreed to permanently install air conditioning at the Pack Unit. The judge, Keith Ellison, praised the agreement.

The Texas Tribune thanks its sponsors. Become one .

“I never dreamt we’d get the Pack Unit air-conditioned,” he said at the settlement hearing.

Since the settlement, the department has also been working to move the most medically vulnerable inmates out of hot prisons across the state — almost 75 percent of Texas prisons and state-run jails don’t have air conditioning in housing areas. Collier said the department has identified about 10,000 inmates who are most at risk for heat sensitivity, and 3,000 were already in air-conditioned beds. Since the settlement, about 700 others have been moved to cooled housing, and the rest still need to be moved.