For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

A federal judge is ordering the Trump administration to reunite the migrant families it has separated. The preliminary injunction issued on Tuesday evening by Dana Sabraw, a California judge appointed by President George W. Bush, gives the government two weeks to reunite children under the age of five and 30 days for children older than five.

The injunction requires parents being held in immigration detention facilities to be quickly reunited with their children unless they pose a threat to the children or the parents choose to remain separated. It also requires the government to ensure that parents and children can speak with each other over the phone within 10 days, and it blocks the Department of Homeland Security from separating additional families without cause. President Donald Trump signed an executive order last week that ended the family separations he started and then claimed he couldn’t stop.

In a highly critical decision, Sabraw expressed disbelief over the Trump administration’s failure to track separated children, facilitate communication between family members, and reunite them after parents were prosecuted for the misdemeanor of crossing the border without authorization:

This is a startling reality. The government readily keeps track of personal property of detainees in criminal and immigration proceedings. Money, important documents, and automobiles, to name a few, are routinely catalogued, stored, tracked and produced upon a detainees’ release, at all levels—state and federal, citizen and alien. Yet, the government has no system in place to keep track of, provide effective communication with, and promptly produce alien children. The unfortunate reality is that under the present system migrant children are not accounted for with the same efficiency and accuracy as property. Certainly, that cannot satisfy the requirements of due process.

Tuesday’s injunction comes in response to a lawsuit brought by the American Civil Liberties Union on behalf of a Congolese woman who was separated from her then six-year-old-daughter at an official port of entry, as well as a Brazilian woman separated from her 14-year-old son after crossing the border without authorization. Lee Gelernt, the deputy director of the American Civil Liberties Union’s Immigrants’ Rights Project, argued the case, and he called the decision an “enormous victory” for separated families. “Tears will be flowing in detention centers across the country when the families learn they will be reunited,” he said in a statement.

Ms. L, the Congolese woman, was separated from her child for nearly five months. Her daughter cried each time they spoke over the phone, and Ms. L feared that they would never see each other again. It took a lawsuit, a court order, and about four months for the government to administer the DNA test that proved she was her daughter’s mother. Ms. L did exactly what the Trump administration tells asylum seekers to do: Seek protection from persecution at officials border crossings, not after being apprehended by Border Patrol.

Ms. C, the Brazilian plaintiff, was separated from her son for more than eight months, despite the fact that the government never claimed she posed a risk to him. It took months to be reunited with her son after she was eventually released from immigration detention. Separated children are classified as unaccompanied minors and transferred to the Department of Health and Human Service’s Office of Refugee Resettlement (ORR), which has its own requirements for when children can be released to parents or other guardians.

Under the “zero tolerance” initiative unveiled by the Trump administration in May, families were separated when parents were placed in jails while they were being prosecuted for crossing the border. The Justice Department does not have to prosecute parents for crossing the border, and past administrations have usually avoided doing so. After the trial ends—often within a few days—parents can be released or placed in family detention facilities with their children. Instead, the Trump administration has generally kept parents in adult detention centers run by US Immigration and Customs Enforcement, leaving children in the custody of ORR.

The ACLU argued that parents in ICE detention facilities should be quickly reunited with their children. Sabraw’s injunction strongly suggests that he will side with the ACLU when he issues a final decision. The lawsuit does not seek to block the zero-tolerance prosecutions that were announced after the ACLU filed its lawsuit.

Trump’s executive order calls for replacing family separations with indefinite family detention, a policy goal his administration pursued long before launching the zero-tolerance program. (A court ruling currently prevents the government from keeping children in family detention for more than about 20 days.) Trump’s executive order made no mention of reunifying the more than 2,000 children his administration separated, and his administration continued to fight the ACLU lawsuit.

Sabraw issued the temporary injunction after deciding that the Trump administration’s treatment of migrant families likely violates their constitutional rights. “We are a country of laws, and of compassion,” Sabraw wrote. “We have plainly stated our intent to treat refugees with an ordered process, and benevolence, by codifying principles of asylum.” The government’s treatment of separated families, he added, “does not meet this standard, and it is unlikely to pass constitutional muster.”

Listen to this week’s episode of the Mother Jones Podcast, which features a discussion of the challenges facing asylum-seekers crossing the border from Mexico: