A U.S. district judge in Chicago ruled Monday that a class-action lawsuit can move forward against Twentieth Century Fox Television. The lawsuit claimed the network encouraged Cook County officials, who are also being sued, to shut down several vital areas of a juvenile detention center while filming scenes for “Empire” — to the detriment of the inmates.

In the second season of Fox’s smash hit, the show’s main character, music mogul Lucious Lyon (played by Terrence Howard), finds himself in jail. To realistically portray his time there, Fox filmed several scenes at the Cook County Juvenile Temporary Detention Center in Chicago during the summer of 2015.

During filming, the detention center was placed on lockdown on three occasions for several days in each instance, the lawsuit claimed. Prisons and jails are generally placed on lockdown if there are security threats, not for the filming of a television show.

While in lockdown, several areas of the detention center, including its school, the family visiting area, outdoor recreation yard, library and chapel were “placed off limits so that Fox’s agents and employees could use them to stage and film the show,” according to the lawsuit.

Meanwhile, the inmates were either forced to remain in their cells or confined to small rooms called “pods,” where they were forced to sit “for days on end,” the lawsuit said, claiming these restrictions were “more severe than those governing many adult jails.”

As a result, the detention center canceled some of their family visits, rehabilitation sessions and schooling, according to the lawsuit.

Fox repeatedly declined several media outlets‘ requests to comment on the lawsuit.

The two episodes featuring Lyon in jail, one which guest-starred comedian Chris Rock, were highly publicized. They were also extremely profitable. Thirty-second advertising spots in the first episode cost $750,000, and spots in the second cost $600,000, according to the lawsuit.

Fox sought dismissal of the class-action lawsuit against it, which was filed by legal guardians of two of the inmates in August 2016, claiming it was not responsible for the lockdowns.

U.S. District Judge Amy J. St. Eve ruled that the suit can move forward. The judge dismissed a claim that Fox infringed on the inmates’ due process rights, but allowed the claim that the network may be liable for “tortious inducement of breach of fiduciary duties,” meaning that Fox may have “colluded” with the detention center’s administration to place the center on lockdown during filming.

The detention center was described as “long-troubled” by the Chicago Tribune in 2015, the same year the episodes were filmed. The newspaper added it had a “reputation for being crowded, unclean and poorly staffed” and that it was often “blasted as a depot where children were locked up in violent, unsanitary, overcrowded conditions.”

More from Morning Mix: