Ruling comes as government says it will reunite only half of migrant children under five by Tuesday deadline.

A US federal judge has rejected the government’s request to allow long-term detention of migrant and refugee children, a setback for President Donald Trump’s executive order that ends his practice of separating parents and children at the US-Mexico border.

Los Angeles US District Court Judge Dolly Gee dismissed as “dubious” and “unconvincing” the US Justice Department’s arguments to modify the 1997 Flores settlement that says children can only be held in immigration detention for up to 20 days.

The government made the request in June to allow it to keep underage migrants and refugees in detention alongside parents, after a public outcry over its tactic of separating children from parents who entered the United States in between official ports of entry.

“It is apparent that the Defendants’ Application is a cynical attempt to shift responsibility to the Judiciary for over 20 years of Congressional inaction and ill-considered Executive action that have led to the current stalemate,” Gee, the daughter of Chinese immigrants, said in her ruling on Monday.

The government asked Gee to suspend the Flores settlement’s requirement that immigrant children be held only in facilities that meet state child welfare licensing regulations, so as to allow whole families to be detained together.

Gee, who was appointed to the bench by President Barack Obama, said the government had known for years that there was “no state licensing readily available for facilities that house both adults and children”.

Demonstrators cross New York’s Brooklyn Bridge during the Keep Families Together march to protest Trump administration’s immigration policy [File: Shannon Stapleton/Reuters]

{articleGUID}

The Trump administration has come under widespread criticism for its “zero tolerance” towards immigrants and refugees.

It is estimated that more than 2,000 children remain in detention and separated from their families.

One asylum seeker from Brazil, who spoke to Al Jazeera last week, said it had been more than a month since she had seen her son, after being separated while crossing the border in May.

There have been other reports of parents being deported to their home countries without their children.

Half of children under five to be reunited by deadline

Last month, a judge in California ordered the US government to reunite parents with children under the age of five by July 10, and all other children by July 26.

But on Monday, a government lawyer said only about half of 100 immigrant and refugee children under age five will be reunited with their parents by Tuesday’s deadline.

At a court hearing, Justice Department lawyer Sarah Fabian said 54 children younger than five would be reunited with parents by the end of Tuesday, and the number could increase depending on background checks.

Fabian acknowledged the government wouldn’t meet the deadline for all the children, citing a variety of reasons, including that the parents of some of the youngsters had already been deported.

{articleGUID}

She told the judge that once parents and children were reunited, they would likely be released from immigration custody.

The judge directed the government to file a detailed accounting of the reunification process and scheduled a hearing for Tuesday at 11am (18:00 GMT).

Lee Gelernt, a lawyer for the American Civil Liberties Union, which brought the case, said he did not think the government was complying with the reunification order.

“It is very troubling that there are children and parents who are not in some kind of government tracking system,” he said after the court hearing. He added that nonprofit groups were trying to find parents the government had failed to locate, who are mostly from El Salvador, Guatemala and Honduras.

He also questioned if the government’s list of children under the age of 5 was accurate.

It's extremely disappointing the government will not be in full compliance with the court order by tomorrow, but the most important thing is that the court will continue to hold the administration's feet to the fire to get these kids reunited with their parents. — ACLU (@ACLU) July 9, 2018

Gelernt added, however, that he believed the government had made “significant” steps in the past 48 hours to unite parents with their children, and he called the effort “a blueprint for going forward with the remaining more than 2,000 families”.

Gelernt said the ACLU was concerned that parents would be put on the street without any money in an unfamiliar city.

The organisation and government agreed that the locations of the releases would not be disclosed, and the government agreed to work with immigration advocates to ensure the parents had money for a hotel and other necessities.