Washington — Federal immigration officials said on Friday they immediately plan to return up to 200 children a day to their parents to comply with a federal court order to reunite more than 2,500 migrant families split up under the Trump administration’s crackdown on the U.S.-Mexico border.

At a hearing on Friday in U.S. District Court in San Diego that marked the latest step in the reunification effort, Judge Dana Sabraw praised the government’s “substantial” efforts to reunite more than half of the 103 youngest children taken from their parents by Tuesday’s deadline, and acknowledged that some could not be reunited immediately.

But he also ordered them to carry out an orderly process for the larger group after initial reports that parents of younger children were stranded at bus stations, forced to pay for transportation or reunited without advance notice, some late at night.

“So much of this is really just common sense and common courtesy,” Sabraw said during a 90-minute hearing on Friday. “There shouldn’t be anything mysterious about it. It should be transparent and easy to do. It should be a very straightforward process.”

Shortly after the hearing, the government filed the broad outlines of its reunification plan with the court, saying it intended to identify six to eight locations to reunite the larger group of 2,551 older children on a rolling basis starting on Friday. It remains unclear if the parents and children will be detained together or released.

All told, the government separated more than 2,650 children from their parents under President Donald Trump’s “zero-tolerance” policy, which the administration ended last month.

Officials also signaled o Friday that not every family will be reunited, which occurred with the smaller group of some 100 younger children. Many parents did not regain custody of their children because of their criminal records, because they were deported or other issues.

In the court filing, officials warned the judge that his orders to speed reunification increased safety risks for children, including he possibility that as many as 175 children would end up with adults who are not their biological parents.

Sabraw had earlier ordered the government to forgo DNA testing of all adults and background and fingerprint checks of all residents in the homes where they will live, unless there was a safety concern.

Advocates had protested that such testing was creating delays and previously had occurred only when officials doubted that the adult was the parent or had concerns about safety.

But Chris Meekins, chief of staff for the Office of the Assistant Secretary for Preparedness and Response, which is helping lead the reunification effort, said in a statement filed on Friday that the “faster reunifications” may land children in “potentially abusive environments.”

Also Friday, the judge ordered the government to provide the ACLU with more information about the separated parents and children and at least 12 hours’ notice before reunification so that advocates could book hotel rooms or find other places for the newly reunited families to stay.

Lee Gelernt, the ACLU lawyer who represents the parents, said “there were lots of glitches” in the initial reunions of parents and children under 5.

Justice Department officials have said they reunited more than half of the younger children, and said some 45 could not be returned for safety reasons or because their parents were deported or in criminal custody.

On Friday, Sabraw also signaled that he was inclined to have the U.S. government shoulder the travel costs for parents trying to reunite with their children, as the ACLU requested, though the issue was unresolved.

Justice Department lawyer Sarah Fabian told the judge that paying travel costs is a “huge ask” that is not within the government’s budget.

To reduce costs, she said the government had moved parents to immigration detention facilties closer to their children. The judge said he would decide the issue on Monday, when another hearing is scheduled.

Fabian said the next wave of reunions likely will take place in fewer locations because the children are older, and lawyers in Texas expect many to occur in that state, where thousands of families were initially apprehended.

Trump ended the family separations before the judge’s order last month. They ignited international condemnation and concern for the physical and emotional welfare of the separated families. A Honduran man strangled himself after officials took his son; Republicans and Democrats alike criticized the policy.

Since the reunifications began, most parents of younger children have been released with ankle monitoring devices pending an immigration court hearing.

The scenario for the older children remains unclear.

The Trump administration has called for migrant families to be detained together, possibly in military installations, until they either prevail in their asylum claims or are deported.

A recent poll suggests there is public support for detaining families, even among Americans who opposed family separations.

A Washington Post-Schar School poll released last week found that 7 in 10 Americans opposed separating children from their parents who crossed the border illegally, but 58 percent said they prefer families be detained until their immigration cases are resolved.

But detaining families together sets up the possibility of future separations, because a federal consent decree says the government cannot detain children in such facilities for more than 20 days. Parents would have to choose between waiving their children’s rights and remaining in detention together, or allowing their children to be released.