A federal judge has ordered Texas to air condition all of the state's lockups, which the prison agency said could cost $1. 5 billion, by the end of 2029.

The ruling, released Tuesday, is a win for inmate advocates and their attorneys, who had asked the court to force the Texas Department of Criminal Justice to cool the entire prison system by that time.

Just over a third of the agency's 104 facilities were fully air conditioned as of Sept. 1.