HOUSTON - A federal judge has given state prison officials 15 days to come up with a plan to lower the temperature to 88 degrees inside a Southeast Texas prison where attorneys for inmates say the sweltering summer heat is endangering their health.

U.S. District Judge Keith Ellison's preliminary injunction applies to about 500 "heat-sensitive" inmates at the Pack Unit, about 65 miles northwest of Houston. Those prisoners already have a variety of health conditions or are at least 65 years old. 

Ellison held a nine-day hearing last month where lawyers for six inmates sought emergency relief.

Texas Department of Criminal Justice officials contended they provide showers, fans and ice water.

Ellison says that's not enough and says the prison system is "deliberately indifferent" to the heat risks.

RELATED | DPS urges Texans to use caution in Summer heat

Texas Attorney General Ken Paxton said that the state will appeal Ellison's ruling because "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." 

Paxton's office said that it will cost the Texas Department of Criminal Justice $20 million to retrofit the Pack Unit with permanent air conditioning.