(CNN) Potentially thousands more parents and children the US government split up at the southern border will now be included in a lawsuit over family separations, a judge ruled Friday.

US District Judge Dana Sabraw's 14-page ruling is a major blow to the Trump administration, which had argued that a new group of separated families revealed in a government watchdog report shouldn't be included in the case. The report from the Health and Human Services inspector general had found that thousands more children had been separated than previously acknowledged.

As a result of the judge's order, officials may have to comb through a massive trove of case files and pinpoint exactly how many families were separated going back as far as July 1, 2017. HHS and the inspector general's office were unable to identify exactly how many more families were separated because there were "significant challenges in identifying separated children." Officials estimated that the children were separated, received by HHS for care and released prior to Sabraw's June 26, 2018, court order ordering a halt to most family separations at the US border.

"The hallmark of a civilized society is measured by how it treats its people and those within its borders," wrote Sabraw, who sits in the Southern District of California. "That Defendants may have to change course and undertake additional effort to address these issues does not render modification of the class definition unfair; it only serves to underscore the unquestionable importance of the effort and why it is necessary (and worthwhile)."

The Ms. L et al. vs. Immigration and Customs Enforcement et al. case was initially prompted by the separation of a Congolese woman and her 7-year-old daughter. The American Civil Liberties Union originally filed the case last year and it was later expanded to become a class action lawsuit.

Read More