CHICAGO (AP) — Illinois prisons must undergo wide reforms in the treatment of transgender inmates, including training for employees and avoiding cross-gender strip searches, under a court order earlier this month.

The order stems from a 2018 lawsuit filed on behalf of five transgender women who said they weren’t provided with appropriate treatment while in custody.

READ MORE: Chicago Weather: Showers By Daybreak

“This is a sweeping victory for our clients, who have been subject to unspeakable harm by a Department of Corrections that has truly been deliberately indifferent to our clients’ suffering,” said Ghirlandi Guidetti, an American Civil Liberties Union of Illinois attorney who represented the women.

In the lawsuit, the women claimed corrections staff didn’t provide appropriate treatment for gender dysphoria, a medical condition where a person experiences deep discomfort with the gender assigned at birth. They alleged delays in hormone treatment therapy. In one case, an inmate’s treatment was started only after attempts to self-castrate.

READ MORE: Oak Lawn Woman Got Locked Out Of Her Facebook Business Account, And Even Facebook Can't Be Sure If The Email To Blame Was A Scam

Illinois Department of Corrections officials have until Jan. 22 to provide U.S. District Court Judge Nancy Rosenstengel with steps they’ve taken to following the order. Department officials have declined comment, citing pending litigation.

Among other things, the order said prisons can no longer “mechanically” assign housing based on genitalia or physical size and appearance.

MORE NEWS: They Had A Tough Year Of E-Learning, But Southland College Prep Seniors Have Now Racked Up More Than $50 Million In Combined Merit Scholarships

(© Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)