US President Donald Trump has lashed out at a judge for blocking his policy of sending asylum seekers to Mexico to await court hearings in their cases.
“A 9th Circuit judge just ruled that Mexico is too dangerous for migrants,” he tweeted. “So unfair to the US.”
His policy would have returned migrants back over the border while they seek a legal right to stay in the US.
The legal defeat comes as migrant numbers at the US-Mexico border surged to their highest since 2008.
Mr Trump was said to be livid after US immigration officials estimated border apprehensions in March had topped 100,000.
The San Francisco ninth district judge’s order on Monday against the migrant policy is not due to go into effect until this Friday, giving US officials a chance to appeal.
Meanwhile, the Department of Homeland Security (DHS), which implements Mr Trump’s immigration directives, is in turmoil following a major shake-up by the administration.
The agency’s Secretary Kirstjen Nielsen quit on Sunday after being summoned to the White House by the president.
Republican Senator Chuck Grassley called on Mr Trump on Monday to halt the leadership purge at the agency.
The senior senator told the Washington Post he is “very, very concerned” about reports of possible further DHS dismissals.
“The president has to have some stability and particularly with the number one issue that he’s made for his campaign,” Mr Grassley said.
“He’s pulling the rug out from the very people that are trying to help him accomplish his goal.”
Last week the Republican president rescinded his own nomination of Ronald Vitiello as director of Immigration and Customs Enforcement.
Speaking to Fox News on Monday, White House spokesman Hogan Gidley said: “It’s time to do things a little differently.
“The president’s looking around to reshape his team so he can have the people in place to carry out his agenda.”
There are also reports that the president is preparing to toughen his stance on immigration.
According to the New York Times, Mr Trump is considering implementing further limits on asylum seekers, ending birthright citizenship and closing ports of entry at the Mexican border.
Part of Mr Trump’s agenda will reportedly include implementing a “binary choice” policy.
This would give migrant parents awaiting immigration hearings a choice: agree for their child to be held separately, or be detained together, possibly indefinitely, until their court date.
The White House reportedly envisages the policy as a way to end “catch and release”, the longstanding practice of allowing undocumented immigrants apprehended at the border to continue on their way into the US while they await court hearings.
A 1997 court decision known as the Flores agreement states that immigrant children are only allowed to be held for 20 days.
The Trump administration has reportedly drafted a regulation to change these rules, an official told Axios, so that the government can detain children for longer periods of time.
Senior White House adviser Stephen Miller is said to be egging on the president to adopt an increasingly hardline stance on immigration.
Democratic congresswoman Ilhan Omar on Monday called Mr Miller “a white nationalist” on Twitter.
Meanwhile, amid an ongoing debate about immigration on both sides of the Atlantic, former President Barack Obama told young people at a town hall meeting in Berlin, Germany: “We can’t label everybody disturbed by immigration as racist.”
He also said immigrants should be encouraged to learn the language of their adopted country.