A federal judge Monday questioned whether the government was trying to hide or obscure something by failing to give information to a civil rights group about thousands of immigrant detainees held for long periods.

U.S. District Judge Richard Berman’s written decision came days after government attorneys insisted they needed more time to comply with his September order granting the American Civil Liberties Union’s Freedom of Information Act request.

The ACLU has said it wants to expose a flawed system that keeps thousands of detainees behind bars for long periods while their eligibility to remain in the country is adjudicated.

Berman wrote that the government “continues, quite obviously, to drag its heals in providing disclosure about immigrant detentions. Hopefully, it is not also trying to hide or obscure a distressing system or set of facts.”

He noted that the U.S. General Accounting Office in a 2004 report found that U.S. Immigration and Customs Enforcement lacks information to provide assurance that its custody reviews of detainees are timely and its custody determinations consistent with the law.

He said the Department of Homeland Security Office of Inspector General in February 2007 determined that required custody decisions were not made in more than 6 percent of cases and were not timely more than 19 percent of the time.

Berman said the government offered “very unpersuasive arguments” when it opposed the ACLU’s original FOIA request nearly five years ago. The ACLU sued the government in federal court in Manhattan in 2011 to force it to turn over the documents.

In a footnote, the judge said he questioned whether the government’s Dec. 25 request for a delay was a misuse of resources that “would not better and more usefully be directed to providing appropriate public disclosure of information regarding the underlying problems of immigrant detention.”

He also said the letter “continues a troubling pattern of, at best,” a loose interpretation of the court’s September order requiring the government to turn over the documents.

In a letter to Berman in November, the government said it could provide 100 out of 22,000 immigrant detainee files within seven years. In a letter last week, the government said it could now provide 385 files within 15 months. Berman questioned if the government had “simply sought to move the goal posts.”

A spokeswoman for government lawyers said Monday that they had no comment.

ACLU attorney Michael Tan said Berman’s decision “confirms — once again — that the government needs to comply with FOIA so that the public can take a real look at how it’s running the immigration lock-up system.”

In 2001, the U.S. Supreme Court said detained immigrants are supposed to be deported or released within about six months.

In 2009, The Associated Press found through a computer analysis of an Immigration and Customs Enforcement database that there were 32,000 immigrants from 177 countries detained, including more than 18,000 with no criminal convictions. The analysis showed that nearly 10,000 had been in custody more than a month and that 400 of those with no criminal records had been locked up more than a year.