The Trump administration has failed to put forward a plan for reunifying children with parents who were deported without them, a federal judge said Friday, warning that the government might be creating “permanently orphaned” children in the process. District Judge Dana Sabraw of San Diego ordered the government to identify one or two people to develop and oversee a plan to reunite the hundreds of children who remain separated from their parents after being taken from them at the border. “The reality is there are still close to 500 parents that have not been located. Many of these parents were removed from the country without their child. All of this is the result of the government’s separation and then inability and failure to track and reunite,” Sabraw said during a status conference on Friday.

The judge focused on parents who were deemed “ineligible” for reunification as the government moved to meet his July 26 deadline for reuniting more than 2,500 children who had been separated from their parents during the Trump administration’s “zero tolerance” border enforcement effort this spring. Officials believe that the parents of 400 of the children who remain separated have been deported. The government and the American Civil Liberties Union, which is representing the plaintiffs in this case, said most of the parents of the children who have not been reunited with family were either deported or otherwise left the country and haven’t been found. Another 80 are people who were released to the interior of the United States and can’t be found; another 30 or so have criminal records or other “red flags” that prevent reunification, the government lawyers told Sabraw on Friday.

A day before the status hearing, the government filed paperwork with the judge saying that the ACLU and its clients should bear much of the responsibility for finding deported parents in Central America. “Plaintiffs’ counsel should use their considerable resources and their network of law firms, [non-governmental organizations], volunteers, and others, together with the information that Defendants have provided (or will soon provide), to establish contact with possible class members in foreign countries,” the report said. But Sabraw was having none of that, saying “this responsibility, of course, is 100 percent on the government. The government has the sole burden and responsibility and obligation to make this happen.” He acknowledged that the ACLU and its network of assisting agencies has people on the ground in Central America who can help locate the parents, and ACLU attorney Lee Gelernt said they’d use those resources to help the government reunite parents and children.

Sabraw, a George W. Bush appointee who has a mild and straightforward manner on the bench, has not threatened the government with any sanctions. But he said the families face severe consequences if parents and children remain apart. “The reality is that for every parent who is not located, there will be a permanently orphaned child and that is 100 percent the responsibility of the administration,” Sabraw said. He said the government should help provide the ACLU with information to help track down missing parents.

Earlier last week, President Trump tweeted praise for Sabraw without naming him. “A highly respected Federal judge today stated that the ‘Trump Administration gets great credit’ for reuniting illegal families. Thank you, and please look at the previous administrations record – not good!”

A highly respected Federal judge today stated that the “Trump Administration gets great credit” for reuniting illegal families. Thank you, and please look at the previous administrations record – not good! — Donald J. Trump (@realDonaldTrump) July 31, 2018

The president was selectively quoting Sabraw, however. Seconds after praising the government’s work in the reunification efforts two weeks ago, the judge also said the administration “is at fault for losing several hundred parents in the process.” Trump also failed to mention an earlier Sabraw ruling in which he found that the administration’s practice of separating families apprehended at the border “is brutal, offensive, and fails to comport with traditional notions of fair play and decency.” It wasn’t clear what Trump was referring to when mentioning the record of the Obama administration, which never had a widespread practice of separating families at the border.