A federal judge in the United States who had directed the administration of President Donald Trump to reunite more than 2,700 migrant children with their parents expanded the order on Friday to potentially cover thousands more, NBC reported.

In a preliminary ruling, District Judge Dana Sabraw of San Diego, California, said parents separated from their children on or after July 1, 2017, should be included as part of a class-action lawsuit brought by the American Civil Liberties Union.

The ruling came after a report from the Department of Health and Human Services Inspector General showed that “potentially thousands” of children were separated from their parents between June 2017 and May 2018 under the government’s “zero-tolerance” policy, when the administration started jailing those illegally crossing the border and separating parents from their children in the process.

The judge’s order had previously applied only to parents whose children were in government custody on June 26, 2018, NPR reported.

Attorneys for the Justice Department had argued that the lawsuit should not be expanded as “it would be too burdensome for them to identify the members of the newly proposed class”.

However, Sabraw in his order wrote, “The hallmark of a civilised society is measured by how it treats its people and those within its borders.”

In May last year, Attorney General Jeff Sessions had announced the “zero-tolerance” policy that allowed authorities to file criminal charges against undocumented immigrants. This had led to nearly 2,000 children being separated from their parents in just six weeks. The Trump administration was criticised for its policy of separating children from their families when they are caught entering the country without documentation.

In June, Trump had signed an executive order to keep families who illegally cross the southern border of the US together as they await immigration proceedings.

“The court made clear that potentially thousands of children’s lives are at stake and that the Trump administration cannot simply ignore the devastation it has caused,” said American Civil Liberties Union lead attorney Lee Gelernt in a statement.

The next hearing in the case will take place on March 28.