A federal judge in Houston threatened to subject Texas prison officials to the same “oppressive” conditions as inmates Friday, openly musing about keeping them in cells subject to high heat.

“It seems the most obvious sanction is pretty straightforward,” U.S. District Judge Keith Ellison said during an emergency hearing Friday, according to the Texas Tribune. “We ought to have prison officials in prison at the same temperature.”

Ellison debated imposing financial and other sanctions to ensure officials would comply with court orders and install air conditioning in Wallace Pack Unit prison, about 95 miles from Houston.

“Shouldn’t we have as a sanction, prison officials in the cells dealing with the same temperatures as the prisoners?” the judge asked Leah O’Leary, representing the Texas Department of Criminal Justice (TDCJ).

HOUSTON MAN FIRST TO BE INDICTED FOR BUMP STOCK POSSESSION SINCE FEDERAL BAN 

O’Leary reassured the judge that his idea would not be necessary and that the state was working to fix the problem, adding: "You have our attention."

“I’m afraid I don’t,” replied Ellison, who questioned the efficacy of financial sanctions since the burden would fall on the taxpayers rather than the officials.

If he decided to hold officials in contempt of court, they would likely be taken to a federal detention center-- which is air-conditioned-- the prisoners’ attorney pointed out.

The Friday hearing was the latest in a five-year legal battle over the heat in the Pack Unit, according to the Texas Tribune.

TEXAS INMATE EXECUTED FOR KILLING MOTHER, 89, DAUGHTER, 71, IN 2003

In 2017, Ellison had deemed the prison’s lack of air conditioning in the Texas summer heat a “cruel and unusual” punishment and ordered the agency to come up with a plan to keep the heat index, the combination of temperature and humidity, no higher than 88 degrees at the Pack Unit. He also ruled that the TDCJ had been intentionally indifferent about the health hazards associated with the heat.

The settlement impacted about 1,300 inmates at the Pack Unit, which got air conditioning and temperature monitoring equipment. Under the settlement, if any of these 1,300 inmates were transferred to other prisons, they would still be subject to the conditions of the settlement at their new facilities.

At Friday’s hearing, Jeff Edwards, an attorney for the prisoners, accused state prison officials of failing to adequately fix problems at the Pack Unit and of not monitoring temperatures and fixing air conditioning problems at various prison facilities some of the 1,300 inmates have been moved to since the lawsuit was settled last year.

Inmates from the Pack Unit who had been transferred to the Stiles Unit in Southeast Texas reported in July that the air conditioning was not working and the heat made them feel “disoriented,” ″nauseous” and like they were on the verge of “passing out,” according to court documents filed this week.

O’Leary said the state has taken steps to fix the problem, including moving most of the 1,300 inmates back to the Pack Unit. For those inmates who can’t be moved back to the Pack Unit, O’Leary said the prison system has ordered that thermostats be installed in the housing areas of these inmates so that temperatures can be monitored.

CLICK HERE TO GET THE FOX NEWS APP

Ellison delayed making a ruling on possible sanctions until he heard from officials, including prison wardens, at a hearing on Tuesday. Ellison said while the settlement only applies to the Pack unit, he believes all Texas prisons should have air conditioning.

Including Pack, Texas has 29 air-conditioned prisons. Another 75 are partially cooled or not cooled at all. During this year’s legislative session, prison officials estimated it could cost about $1 billion to install air conditioning at prison units that don’t have it.

Figures previously presented in court showed at least 22 Texas inmates have died of heat stroke since 1998, although none at the Pack Unit.

The Associated Press contributed to this report.