The Trump administration is seeking to curb migration from Central America by introducing new rules over who can claim asylum in the US.
The measures, unveiled on Monday, say migrants who fail to apply for asylum in a country they pass through en route to the US will be ineligible.
Migrants who have been trafficked will be exempt from the ban.
Mexico has rejected the measures and the American Civil Liberties Union has mounted a legal challenge.
The UN refugee agency (UNHCR) said it was "deeply concerned" over the new rules.
Announcing the rule change, Attorney General William Barr said it would deter "economic migrants" from exploiting the US asylum system.
"The United States is a generous country but is being completely overwhelmed by the burdens associated with apprehending and processing hundreds of thousands of aliens along the southern border," Mr Barr said in a statement.
Mexican Foreign Minister Marcelo Ebrard, however, said his country would not become a dumping ground for those rejected by the US and would not return refugees to danger zones.
"Mexico does not agree with measures that limit access to asylum and refuge," he told reporters.
In a statement, the UNHCR said the measures would "endanger vulnerable people in need of international protection from violence or persecution."
"This measure is severe and is not the best way forward," it added.
It is not clear what will now happen to asylum seekers rejected by the US at the border with Mexico.
The new regulations are the Trump administration's latest attempt to toughen the US asylum process as increasing numbers of Central American migrants arrive at the US-Mexico border.
The US announcement comes after a court in Guatemala temporarily blocked a migration deal which could have seen the Central American nation defined as a "safe third country".
Migrants from other countries en route to the US would have had to apply for asylum in Guatemala under the agreement.
Why is Mr Trump changing the asylum rules?
He says "loopholes" in the asylum process are allowing migrants from Central America and elsewhere to live in the US illegally.
Currently, when migrants arrive at the US-Mexico border, they are allowed to request asylum regardless of which country they passed through to get there.
Only migrants who have travelled through countries deemed to be "safe" face restrictions on their asylum claims in the US.
Claimants are free to reside in the US until their case is dealt with - a process that often takes years.
What are the new US asylum rules?
The new measures limit the ability of migrants to claim asylum if they enter the US across its southern border, having come via another country and not sought its protection.
There are exemptions, including for migrants denied protection in a country and victims of human trafficking.
The asylum restrictions, due to come into effect on Tuesday, have been described as an "interim rule" by the Department of Justice and the Homeland Security.
It effectively circumvents Congress, paving the way for a showdown with Democrats and civil liberties groups who oppose Mr Trump's tough stance on asylum seekers.
"The Trump administration is trying to unilaterally reverse our country's legal and moral commitment to protect those fleeing danger. This new rule is patently unlawful and we will sue swiftly," said Lee Gelernt, a lawyer at American Civil Liberties Union.
Other attempts to deny asylum to migrants who enter the country illegally have been challenged in court.
Under the 1951 UN Refugee Convention, there is no obligation on refugees to claim asylum in the first safe country they reach. Asylum seekers are protected against prosecution for illegal entry to a foreign country by Article 31 of the Convention.
However, the Trump administration has taken the view that most newcomers from Central America are economic migrants and not genuine refugees.
What else is Mr Trump doing to reduce migration?
Mr Trump has consistently taken a hard line on immigration to the US, vowing to stem the flow of migrants with stringent asylum policies and a fortified wall along the Mexican border.
Controversial policies implemented by his administration in recent years include prosecuting adults who cross the border illegally, resulting in children being separated from their parents.
His administration has also suspended aid to Guatemala, as well as Honduras and El Salvador, arguing they are not doing enough to curb the migrant flow.
Guatemala's President, Jimmy Morales, has been under pressure from the US, but Guatemala's constitutional court granted an injunction late on Sunday which effectively blocks him from signing a migration deal.
"Safe third country" agreements require migrants to seek asylum in the first country designated as "safe" they reach rather than proceed to a country of their choice.
Such a deal would affect the thousands of Hondurans and Salvadoreans who cross Guatemala on their way north to the US, who - under such a deal - would face being sent back to Guatemala, the first "safe" country they entered.