The Trump administration said Thursday that more than 700 children separated from their parents at the U.S.-Mexico border remained apart, hours before a court-imposed deadline to reunify them.

In a court filing, the Justice Department said 1,820 children ages 5 and up had been discharged from the custody of the Office of Refugee Resettlement. Of those, 1,442 were reunited with their parents in the custody of Immigration and Customs Enforcement (ICE), while another 378 were released "in other appropriate circumstances."

A federal judge had given the administration until the end of Thursday to reunite more than 2,500 separated children with their parents, guardians or other sponsor. The separations took place under President Trump's so-called "zero tolerance" border policy, which called for criminal prosecution of anyone caught crossing the U.S. border illegally.

The administration said that 711 separated children had parents or guardians who are "either not eligible for reunification or not available for discharge at this time." Of those children, 431 are listed as having parents "outside the United States." Another 120 had parents who waived reunification, while an additional 173 had parents who were released to the interior or whose location was "under case file review."

A Justice Department spokesperson told Fox News that the government would meet the court deadline, saying, "The expected total number of eligible potential class members in ICE custody [seeking to be reunited], who will not have been reunited [by the end of the day]: 0."

Lee Gelernt, an attorney for the American Civil Liberties Union who represents the separated families, said the government should not be congratulating itself for meeting its "self-defined" deadline.

"These parents and children have lost valuable time together that can never be replaced," he said. "We're thrilled for the families who are finally reunited, but many more remain separated. The Trump administration is trying to sweep them under the rug by unilaterally picking and choosing who is eligible for reunification.

"We will continue to hold the government accountable and get these families back together."

On Tuesday, Homeland Security Secretary Kirstjen Nielsen told Fox News' "Special Report" that the Trump administration was "on track" to meet the reunification deadline. At a hearing that same day, U.S. District Judge Dana Sabraw praised the administration's efforts at completing the reunifications.

"When we meet on Friday, reunification will have been completed," he said. "This work has to be highlighted and commended."

However, Sabraw also criticized the government for a lack of information about the parents' whereabouts, calling it the effect of "a policy that was in place that resulted in large numbers of families being separated without forethought as to reunification and keeping track of people."

Meanwhile, Homeland Security's internal watchdog said it would review the separation of families, along with the conditions at Border Protection facilities where migrant children are held, in response to scores of congressional requests to do so.

For the last two weeks, children have been arriving steadily at ICE locations in Texas, Arizona and New Mexico to be reunited with parents. Faith-based and other groups have provided meals, clothing, legal advice and plane and bus tickets. The families are generally released, and parents are typically given ankle-monitoring bracelets and court dates to appear before an immigration judge.

Both sides were due in court Friday, when the judge was going to decide whether to ban deportations of families for seven days after they are reunified so that parents have time to discuss their options.

Late last month, Sabraw ordered a nationwide halt to family separations, which Trump effectively did on June 20 following an international outcry. Sabraw issued a 14-day deadline to reunite children under 5 with their parents -- 30 days for older children.

On Friday, family attorneys are to begin turning their attention to those who weren't reunited — parents who had a criminal record, parents who were no longer in the U.S. and children who were handed over to other sponsors, Gelernt said.

Fox News' Jake Gibson, Nicole Collins and The Associated Press contributed to this report.