PHOENIX (AP) — A years-old lawsuit challenging detention conditions in several of the Border Patrol’s Arizona stations will go to trial Monday as the agency as a whole has come under fire following several migrant deaths.

The lawsuit filed in 2015 applies to eight Border Patrol facilities in Arizona where attorneys say migrants are held in unsafe and inhumane conditions. A preliminary injunction granted by U.S. District Court Judge David C. Bury in 2016 already requires the Tucson Sector to provide clean mats and thin blankets to migrants held for longer than 12 hours and to allow them to wash or clean themselves.

But advocates say the Border Patrol still holds immigrants for prolonged periods in filthy and freezing conditions. Although the lawsuit predates last year’s surge in immigrant arrivals at the southern border, it illustrates the some of the challenges posed when migrants are detained, especially if they are children.

Nearly 852,000 people — largely families with kids — were apprehended last fiscal year. This prompted cries of a crisis at the border from government officials looking to stem the numbers and widespread allegations of subpar conditions in Border Patrol facilities that are designed for short-term stays for adults.

In Arizona, migrants and advocates have long complained about the infamously named “hieleras,” or iceboxes, where those apprehended by the Border Patrol are held before being turned over to another agency or deported.

Photos from 2015 that were evidence in the case show men jammed together under an aluminum blanket and a woman using a concrete floor littered with trash to change a baby’s diaper. Others showed rusty toilets, dirty toilet paper on the floor and a malfunctioning water fountain.

“We’re talking about ensuring that the government is meeting constitutional standards when it comes to the detention of people in these facilities,” said Victoria López, advocacy and legal director for the ACLU of Arizona, one of the organizations that sued.

In 2017, Bury said the agency violated court orders by failing to preserve surveillance footage that it was required to turn over. Bury partially granted a motion to hold the Tucson Sector in civil contempt over video files that were irreparably damaged, agreeing the agency knew about the bad files but didn’t notify plaintiffs.

The Border Patrol didn't respond to a request for comment. It has defended its practices in the past, saying its facilities are designed for short-term stays and that a variety of factors affect how long someone is there.

Immigrants held in the Tucson Sector spent an average of nearly 54 hours in custody during the fiscal year that ended on Sept. 30.

“The number of individuals in a given hold room is never intended to create discomfort or challenges for those in custody, but rather is determined by operational concerns,” government attorneys wrote in a filing on Jan. 6. “Food, water, sanitation, hygiene items, bedding, medical care, etc., are not withheld as a punitive measure, and station temperatures are not set for punitive purposes.”

The trial is expected to take two weeks.

Copyright 2020 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.