The judge, who was appointed by President George W. Bush, set the deadline last week, writing that the “situation has reached a crisis level” and that the “chaotic circumstances” were of the government’s own making.

Jonathan White, a Health and Human Services official, filed a declaration with the court that gives perhaps the most detailed account yet of what the government is doing and the hurdles it faces. Its database has some information about the children’s parents but was not designed to reunify families by the court’s deadline.

The department has manually reviewed the cases of all 11,800 children in its custody by working nights and weekends, White said. The results of that review are being validated.

DNA cheek swab tests on parent and child take nearly a week to complete, said White, who called the risk of placing children with adults who aren’t their parents “a real and significant child welfare concern.”

“The Government does not wish to unnecessarily delay reunifications or burden class members,” the Justice Department filing reads. “At the same time, however, the Government has a strong interest in ensuring that any release of a child from Government custody occurs in a manner that ensures the safety of that child.”

The ACLU sued in March on behalf of a Congolese woman who was separated from her daughter for five months after seeking asylum at a San Diego border crossing and a Brazilian asylum-seeker who has been separated from her son since an arrest for illegal entry in August near the Texas-New Mexico border.