A federal judge in Arizona has issued sanctions against the U.S. Border Patrol over destruction of evidence the agency was required to keep during an ongoing civil lawsuit.

Judge David C. Bury issued the sanctions Monday in a months-long lawsuit filed by a coalition of advocacy groups on behalf of three immigrants who say the Border Patrol's Tucson Sector routinely holds immigrants in inhumane, dirty and extremely cold cells for extended periods of time.

"The Court concludes the destruction of the video-tape recordings made prior to this Court's August 14, 2015, Order was, at best, negligent and was certainly willful. Defendants provide no explanation why, in response to Plaintiffs' notifications regarding litigation, the Defendants did not undertake the efforts initiated in response to the Court's August 14 Order," Bury wrote.

The Border Patrol will now have to produce all existing video recordings from all Tucson Sector stations from June 10 to current time within two weeks, according to the sanctions issued.

U.S. Customs and Border Protection (CBP), the Border Patrol's parent agency within the Department of Homeland Security (DHS) did not responded to calls seeking comment, but typically does not comment on pending litigation. It has said its facilities are designed to be short-term and that agents make every effort to ensure that immigrants in custody are given food, water and medical attention.

The lawsuit was filed in June. In August, Bury issued an order requiring the Border Patrol to allow attorneys access to four of the Tucson Sector's eight facilities for inspection. He also required that the Border Patrol keep and not destroy video surveillance tapes of detainee holding areas.

But several of the stations aren't equipped to do so, and getting the video recording equipment up to date has been costly, the Border Patrol said.

The Border Patrol said it undertook emergency measures to add temporary electronic storage for the preservation of video footage for a 15-day cycle at a cost of about $10,000. Still, three stations had either non-working storage devices or didn't record video at all.

"Border Patrol has made, and continues to make, significant progress in implementing the emergency upgrade. Nonetheless, despite these efforts, technical issues and the limitations of the existing digital infrastructure in Tucson Sector have presented challenges that Border Patrol continues to work to overcome..." the agency's attorney wrote in a notice to the court.

But the Border Patrol should have sought a protective order or asked the court to modify its requirement if it couldn't comply with the order, attorney James Lyall said.

Lyall, an attorney with the ACLU, one of the organizations that filed the lawsuit, said it's rare that a judge sanctions a federal agency.

"We believe the destroyed video would have shown the Border Patrol failing to follow its policies and subjecting countless individuals, including our clients, to inhumane and unconstitutional conditions. So the court was right to impose sanctions for the agency's deliberate destruction of key evidence," Lyall said.

The Associated Press