Updated

The Trump administration must expedite efforts to reunite illegal-immigrant families who remain separated despite Tuesday's court-ordered deadline for action, including by skipping DNA tests for many children, a federal judge ruled Tuesday.

Government lawyers had argued that all parents and children should be tested. Their reasoning: DNA testing is faster than authenticating documents, and protects children — especially the youngest — from being handed to people who may not be their biological parents.

Officials said testing on 102 migrant children under 5 years old revealed five cases in which adults claiming to be parents actually were not, including two in which the results came as a surprise to the adults.

But U.S. District Judge Dana Sabraw, siding with the American Civil Liberties Union, said DNA testing needed to be done only when parentage couldn't be proven through birth certificates or other ways, or when the lack of a DNA test would prolong family separation. The samples should be destroyed in 7 days and not used for any other purposes, Sabraw ruled.

Still, Sabraw said that despite their differences, both sides were "all rowing in the same direction" in their efforts to end family separations at the border.

"These are firm deadlines, not aspirational goals."

— U.S. District Judge Dana Sabraw

Last month, Sabraw set Tuesday as the deadline for the Trump administration to reunite children under 5 with their families. He also set July 26 as the deadline to reunite nearly 3,000 children over age 5.

Approximately 63 illegal immigrant children under age 5 are eligible to be reunited with their parents by Tuesday's deadline. That's only about half of the 100 or so toddlers covered by the order, although several are ineligible for immediate reunification because of their parents' criminal history or uncertainty surrounding parenthood status.

"These are firm deadlines, not aspirational goals," Sabraw said Tuesday, adding that he would want a full explanation later in the week for eligible families who were not reunited.

WHAT EXACTLY IS TRUMP'S ZERO-TOLERANCE ILLEGAL IMMIGRATION POLICY?

Sabraw also said fingerprinting other adults in the household shouldn't be required and that legal orientation training could occur after reunification, not before, as the government wanted.

“The court could not have been clearer that business as usual is not acceptable. The Trump administration must get these children and parents reunited,” Lee Gelernt, deputy director of the ACLU’s Immigrants’ Rights Project, responded.

On Monday, Sabraw, a George W. Bush appointee, said he was "very encouraged" by the Trump administration's "real progress" in reuniting illegal-immigrant families separated at the border.

"There's no question that the parties are meeting and conferring," Sabraw said at a court hearing Monday. "This is real progress, and I'm optimistic that many of these families will be reunited tomorrow, and then we'll have a very clear understanding as to who has not been reunited, why not, and what time-frame will be in place."

Fox News' Nicole Collins, Bill Mears and The Associated Press contributed to this report.