By David Iaconangelo | Dec 26 2013, 02:00PM EST

The Associated Press reported on Wednesday that the Department of Homeland Security (DHS) is defending itself from charges that it has taken inappropriately long in providing information on thousands of immigrant detainees across the nation. In a letter from the office of US Attorney Preet Bharara, DHS argued that it was “not feasible” to comply with a Freedom of Information Act filed by the American Civil Liberties Union (ACLU) almost five years ago, when the ACLU requested documents from over 22,000 individual files. Instead, the agency says, it can give the ACLU a sample of 385 files from a 15-month period within eight weeks if it revises its order.

The letter comes five days after U.S. District Judge Richard M. Berman criticized the DHS and Immigration and Customs Enforcement (ICE) for what he called a process for releasing information that was “painstaking and riddled with further delay.” According to the AP, the judge also noted that since his order on Sept. 9 to release documents to the ACLU, the agencies had still not done so, and that the agencies had sometimes said it would take as much as seven years to release as few as 100 files.

The ACLU had sought the information from DHS and ICE as part of an investigation into what it described as a practice of “prolonged immigration detention — for months, if not years — without adequate procedures in place to determine whether their detention is justified." In accordance with a 2001 Supreme Court ruling, immigrants should spend no longer than six months in detention, after which they must be deported or released. But an analysis carried out by the AP in 2009 and referenced by the ACLU lawsuit showed that out of the 32,000 immigrants in detention at the time – more than 18,000 of whom had no criminal record – 400 of them, with no criminal records, had been in detention for over a year, and a dozen had been there for more than three years.