For children under five, reunification must take place within two weeks of the order, issued Tuesday by US District Judge Dana Sabraw in San Diego.
Sabraw issued the ruling in response to a suit filed by the American Civil Liberties Union on behalf of a seven-year-old girl who was separated from her Congolese mother and a 14-year-old boy who was separated from his Brazilian mother.
The judge also issued an injunction against any more family separations.
US federal authorities have 10 days to allow parents to call their children if they are not already in touch with them.
States sue Trump administration
This comes after more than a dozen states sued Trump over separating migrant families earlier on Tuesday.
In a complaint filed with US District Court in Seattle, 17 states and the District of Columbia argued the administration’s policy was unconstitutional in part because it was “motivated by animus and a desire to harm” immigrants arriving from Latin America.
“The new federal executive order does not bring back together the thousands of families that were torn apart by the federal government’s policy, and it does not prevent families from being separated in the future,” Illinois Attorney General Lisa Madigan, a Democrat, said in a statement on the lawsuit.
The family separations began because of the administration’s 2-month-old “zero tolerance” policy of seeking to prosecute all adults who cross the border illegally, including those traveling with children.
But Trump backtracked last Wednesday amid mounting global outrage spurred by images of children being held in cages.
In an executive order ending the family separations, Trump did not explain how his hardline immigration policies could be adjusted to keep families intact and house them while their legal status is assessed.
Although the administration has said the zero tolerance policy remains in place, officials said on Monday that parents who crossed illegally with their children would not face prosecution for the time being, because the government was running short of space to house them.
Health and Human Services Secretary Alex Azar told a Senate hearing on Tuesday that most of the 2,000-plus children who had been separated from their parents could not be reunited with them until Congress passes new legislation.
A 1997 court settlement known as the Flores agreement set policy for the detention of minors in the custody of immigration officials, and a federal appeals court has interpreted it to allow immigration officials to detain families for only 20 days.
While that settlement is in place, Azar said the children could not be moved to be with their parents in detention.
“I cannot reunite them while the parents are in custody because the court order doesn’t allow kids to be with their parents for more than 20 days,” Azar said.
He called on Congress to fix the Flores agreement. Until it does so, he said, HHS will have to wait for families to go through immigration proceedings or be granted asylum before reuniting children with their parents.
The children separated from their parents in recent weeks are now scattered across the country, some in foster homes and others in institutions, their whereabouts often unknown to their parents.
In a ruling on Tuesday that recognized the president’s broad authority to set immigration policy, the U.S. Supreme Court, in a 5-4 vote, upheld Trump’s travel ban targeting several Muslim-majority countries.
After retreating on the family separations, Trump urged Congress to act quickly and follow up his order with legislation.
But he then said lawmakers from his Republican Party, which has a majority in Congress, should give up on it.
The House of Representatives was expected to vote on Wednesday on a broad-based immigration bill that would bar the separation of migrant children from their parents and provide $25 billion for a wall that Trump has vowed to build along the U.S.-Mexico border.
House Speaker Paul Ryan said the broader bill would also resolve the issue of young adults known as “Dreamers,” who were brought to the United States illegally as children, focus on a merit-based immigration system and secure U.S. borders and the rule of law.
But the measure was widely expected to fail. Several House conservatives left a closed-door meeting of Republicans on Tuesday expressing discontent with the broad bill. Without their support, it will likely be rejected.
Ryan said he would not rule out the possibility of bringing to a vote a narrower bill addressing only the detention of immigrant families, if the broader bill did not pass.
Senate Democrats and Republicans have been exploring possible legislation to ban the separation of immigrant children from their families and require rapid reunification of children taken from their parents under the zero tolerance policy.
Republican Senate Majority Leader Mitch McConnell said on Tuesday he would like to see the Senate unanimously pass legislation to prevent family separations.
“We’re hopeful that they can reach an agreement to deal with this real emergency issue,” McConnell told reporters, referring to a Senate compromise effort by Democrat Dianne Feinstein and Republican Ted Cruz.
“If they can, I would hope that it’d be something the Senate could pass on a voice vote,” McConnell said.
First lady Melania Trump plans to visit immigration facilities later this week, her spokeswoman Stephanie Grisham said on Tuesday, without giving further details.
Melania Trump last week visited a shelter that houses migrant children in Texas, but the trip was overshadowed by controversy over a jacket she wore with the words: I really don’t care, do u?” scrawled on the back.