WASHINGTON — The Trump administration said today it will end asylum protections for most migrants who arrive at the U.S.-Mexico border in a major escalation of the president’s battle to tamp down immigration.

According to a new rule published in the Federal Register, asylum seekers who pass through another country first will be ineligible for asylum at the U.S. southern border.

The rule, expected to go into effect Tuesday, also applies to children who have crossed the border alone.

The rule applies to anyone arriving at the U.S.-Mexico border. Sometimes asylum seekers from Africa, Cuba or Haiti and other continents arrive there, but the vast majority of migrants arriving recently come from Central America.

There are some exceptions, including for victims of human trafficking and asylum-seekers who were denied protection in a country. If the country the migrant passed through did not sign one of the major international treaties governing how refugees are managed (though most Western countries signed them) a migrant could still apply for U.S. asylum.

But the move by President Donald Trump’s administration, even if blocked by courts, is reversing decades of U.S. policy on how refugees are treated and marks an escalation even compared to other hardline efforts meant to choke off the flow of people from poor and war-torn nations.

Attorney General William Barr said that the United States is “a generous country but is being completely overwhelmed” by the burdens associated with apprehending and processing hundreds of thousands of migrants at the southern border.

“This rule will decrease forum shopping by economic migrants and those who seek to exploit our asylum system to obtain entry to the United States,” Barr said in a statement.

The policy is almost certain to face a legal challenge; the American Civil Liberties Union already signaled it would sue. ACLU attorney Lee Gelernt, who has litigated some of the major challenges to the Trump administration’s immigration policies, said the rule was unlawful.

“The rule, if upheld, would effectively eliminate asylum for those at the southern border,” he said. “But it is patently unlawful.”

U.S. law allows refugees to request asylum when they arrive at the U.S. regardless of how they did so, but there is an exception for those who have come through a country considered to be “safe.” But the Immigration and Nationality Act, which governs asylum law, is vague on how a country is determined “safe“; it says “pursuant to a bilateral or multilateral agreement.”

Right now, the U.S. has such an agreement, known as a “safe third country,” only with Canada. Mexico and Central American countries were considering a regional compact on the issue, but nothing has been decided. Guatemalan officials were expected in Washington today, but apparently a meeting between Trump and Guatemalan President Jimmy Morales was canceled amid a court challenge in Guatemala over whether the country could agree to a safe third with the U.S.

The new rule also will apply to the initial asylum screening, known as a “credible fear” interview, at which migrants must prove they have credible fears of returning to their home country. It applies to migrants who are arriving to the U.S., not those who are already in the country.

Acting Homeland Security Secretary Kevin McAleenan said additional funding given by Congress for aid at the U.S.-Mexico border isn’t enough.

“Until Congress can act, this interim rule will help reduce a major ‘pull’ factor driving irregular migration to the United States.”