A US judge has temporarily blocked an order by President Donald Trump that barred asylum for immigrants who entered the country illegally from Mexico, the latest courtroom defeat for Mr Trump on immigration policy.
District Judge Jon Tigar in San Francisco issued a temporary restraining order against the asylum rules.
His order takes effect immediately, applies nationwide, and lasts until at least 19 December when the judge scheduled a hearing to consider a more long-lasting injunction.
Mr Trump cited an overwhelmed immigration system for his recent proclamation that officials will only process asylum claims for migrants who present themselves at an official entry point.
Civil rights groups sued, arguing that the president's 9 November order violated administrative and immigration law.
In his ruling, Judge Tigar said the US Congress clearly mandated that immigrants can apply for asylum regardless of how they entered the country.
He called the latest rules an "extreme departure" from prior practice.
"Whatever the scope of the President's authority, he may not rewrite the immigration laws to impose a condition that Congress has expressly forbidden," Judge Tigar wrote.
Judge Tigar was nominated to the court by former president Barack Obama.
Previous immigration policies of the Trump administration, including measures targeting sanctuary cities, have also been blocked by the courts.
The asylum ruling came as thousands of Central Americans, including a large number of children, are travelling in caravans toward the US border to escape violence and poverty at home.
Some have already arrived at Tijuana, a Mexican city on the border with California.
Rights groups have said immigrants are being forced to wait days or weeks at the border before they can present themselves for asylum, and the administration has been sued for deliberately slowing processing times at official ports.
At a hearing earlier yesterday, American Civil Liberties Union attorney Lee Gelernt said the order clearly conflicted with the Immigration and Nationality Act, which allows any person present in the United States to seek asylum, regardless of how they entered the country.
Mr Gelernt said the ACLU had recently learned Mexican authorities have begun barring unaccompanied minors from applying at US ports of entry.
Mexico's migration institute said in a statement that there was "no basis" for the ACLU's claims, noting that there had been no such reports from the United Nations or human rights groups that are monitoring the situation at the border.
Uriel Gonzalez, the head of a YMCA shelter for young migrants in Tijuana, Mexico, said he had not heard of any new measures directed at unaccompanied minors.
He noted there were already long lines to get a turn with US authorities.
"This can take a while because the number of migrants has overwhelmed capacity. It is too much," he said.
President Trump sent more than 5,000 soldiers to the 3,100km frontier with Mexico to reinforce the border, although critics dismissed the move as a political stunt ahead of congressional elections on 6 November.