A federal judge on Tuesday ruled that the Trump administration must stop separating most immigrant families coming into the U.S. unauthorized, and reunify separated families in the next month.

According to BuzzFeed News, U.S. District Judge Dana Sabraw ruled in San Diego that the administration began separating families without a system to track children, to maintain communication between separated families, nor to reunite families after the parent’s criminal case ends.

In his ruling, Sabraw concluded that immigrant parents represented in the suit would “suffer irreparable harm” should the court not impede, and he quoted statements from the separated parents. “The separations at issue have been agonizing for the parents who have endured them,” Sabraw wrote the statements indicated.

Under the order, the federal government cannot separate families while the parent is detained except in cases where the parent is “unfit or poses a danger” to children, or if the parent waives the cohabitation. The Trump administration is also required to reunite all immigrant parents with their children in the next 30 days (or 14 days if the child is under 5 years old) and open communication between separated families in the next 10 days. The ruling applies to both families who are seeking asylum and those who crossed into the U.S. unauthorized “between ports of entry,” with more than 2,300 children who’ve already separated from their parents.

Sabraw also ordered Attorney General Jeff Sessions to have the Justice Department ask for a judge to change the agreement on how long children can stay in detention, in order to allow the children to stay with their parents while in detention instead of being forced to separate within weeks as determined by the pre-existing agreement.

Led by the American Civil Liberties Union (ACLU), the case represented two lead plaintiffs, Ms. L, an asylum-seeker from the Democratic Republic of the Congo, and Ms. C, an immigrant from Brazil. Both women were separated from their children, 6 years old and 14 years old, respectively, after entering the U.S. Sabraw allowed the case to become a class action lawsuit, which now represents all adults in immigration custody whose child has been separated from them and placed in child detention.

“This ruling is an enormous victory for parents and children who thought they may never see each other again. Tears will be flowing in detention centers across the country when the families learn they will be reunited,” Lee Gelernt, deputy director of the ACLU’s Immigrants’ Rights Project, told BuzzFeed News in a statement.

In defiance of Trump, a federal judge in San Diego appointed by Bush Sr. has ruled that all children currently held must be reunited with their families within 30 days. Babies under 5 to be returned in 14 days. Props to ⁦@ACLU⁩ for filing + fighting. https://t.co/5811PNgdT0 — Ava DuVernay (@ava) June 27, 2018

https://twitter.com/krassenstein/status/1011924414756278272

Kids under age 5 must be reunified w/their parents in 14 days under the court order; and kids age 5 and older must be reunited within 30 days. Let's all stand together & tell the Trump admin that any appeal of this would be shameful b/c #FamiliesBelongTogether. 4/ — Karen Tumlin (@KarenTumlin) June 27, 2018

READ MORE:

Sabraw’s order follows less than a week after President Donald Trump signed an executive order against family separation. However, the vague executive order states that the administration would prefer to keep families together, and aside from requesting that the Department of Defense find additional detention space, stated few specifics on if the families already separated would be reunited.

At the time, the Department of Homeland security stated that families already separated would be reunited at the end of a parent’s criminal case, and that the children now classified as “unaccompanied aliens” as a result of the separation would continue the sponsorship or child detention process through Health and Human Services’ Office of Refugee Resettlement.

This latest decision “makes it even more imperative that Congress finally act to give federal law enforcement the ability to simultaneously enforce the law and keep families together,” a Justice Department spokesperson told BuzzFeed News in a statement.

H/T BuzzFeed News