The Trump administration introduced new measures Thursday to deny asylum to migrants who enter the country illegally, invoking national security powers to curb long-standing humanitarian protections for foreigners arriving on American soil.

The restrictions will invoke authorities used by President Trump to implement his “travel ban” in early 2017, according to senior administration officials who outlined them, and apply indefinitely.

The measures are expected to face swift legal challenges. Immigrant advocacy groups insist that U.S. laws clearly extend asylum protections to anyone who reaches the United States and expresses a fear of persecution, no matter how they enter the country.

Administration officials said that the Supreme Court has upheld the president’s broad executive powers on such matters and that the restrictions rolled out Thursday represent a reasonable response as the nation’s immigration system is drowning in what they characterized as frivolous asylum claims by migrants who cross illegally.

“Those who enter the country between [official] ports of entry — i.e., illegally — are knowingly and voluntarily breaking the law,” one administration official said. “So it’s just important to remind everybody that while all immigration laws do afford people various forms of protection, the reality is that it’s a violation of federal law to enter our country in the manner that these illegal aliens are entering the country.”

Trump is preparing to issue a proclamation asserting the emergency powers, and the rule changes will be published Friday in the Federal Register, according to the officials, who spoke with the media in a conference call on the condition of anonymity. They did not explain why they could not be identified.

Asylum seekers turn themselves in to a U.S. Border Patrol agent after crossing from Mexico into the United States on Wednesday in Mission, Tex. (John Moore/Getty Images)

These asylum restrictions mark the administration’s latest attempt to prevent immigrants and foreigners from entering the United States. Thursday’s announcement comes as an estimated 7,000 to 10,000 Central Americans move north through Mexico in caravan groups. Trump has demanded new tools to stop them from entering the United States and ordered the deployment of thousands of U.S. troops to back up border agents.

“Our nation is experiencing an unprecedented crisis on our Southern Border,” the Department of Homeland Security said in a statement. “Low standards for claiming a fear of persecution have allowed aliens with meritless claims to illegally enter our country, claim ‘credible fear,’ and then in many cases be released pending lengthy proceedings.”

Privately, Homeland Security officials acknowledge that the new measures, at least on their own, are unlikely to achieve the kind of immediate deterrent effect the White House desires.

Detention capacity at U.S. immigration jails is nearly maxed out, and court-imposed limits on the government’s ability to hold children in immigration jails mean caravan families who seek protection are still likely to be released into the United States pending a hearing.

A U.S. soldier stands guard near the U.S.-Mexico border last week in Donna, Tex. (John Moore/Getty Images)

“Congress very specifically said you can apply for asylum if you arrive in the United States regardless of whether you’re at a port of entry,” said Omar Jadwat, director of the American Civil Liberties Union’s Immigrants’ Rights Project. “They clearly and explicitly meant to make asylum available to anyone who reaches the United States.

“We do this because of our obligations under international law and who we are as a country, and what we understand our role to be in terms of protecting people fleeing persecution,” added Jadwat, who said ACLU attorneys have been anticipating the new measures and reviewing legal options. “If the president doesn’t like what the law says, the way to address it is to get Congress to pass a new one.”

Under U.S. immigration laws, foreigners who arrive on American soil stating a fear of return can request asylum as a shield against deportation. A U.S. asylum officer then conducts an interview to determine if the person has a “credible fear” of persecution, in which case the applicant is typically assigned a court date and released from custody.

Soaring numbers of migrants have entered the United States taking this administrative path in recent years, often crossing illegally to turn themselves in to U.S. border agents. Since 2014, asylum claims at the border have increased fourfold, adding to a backlog of more than 750,000 pending cases in U.S. immigration courts.

The Trump administration’s new measures would continue to allow foreigners to request asylum if they enter the country legally at U.S. ports of entry, but not those who cross without authorization, administration officials said. Under the changes, migrants who cross illegally would be ineligible for asylum, but they could still be spared from deportation by qualifying for a lesser status known as “withholding of removal.”

That does not provide a path to a green card or citizenship, and instead functions as a kind of provisional suspension of the deportation process, revocable at any time. Nonetheless, it would still give those who cross illegally a way to get into the immigration court backlog and be released from custody, especially those who are traveling with children.

Qualifying for withholding of removal is generally more difficult, because applicants have to meet a higher standard of proof.

One senior official said the purpose of the rule change would be to funnel asylum seekers to ports of entry, where the government will have more personnel and resources available to process their claims. But with so many asylum seekers arriving at border crossings in recent months, U.S. customs officers have been limiting the number of people allowed to approach the pedestrian entry lanes, a tactic known as “metering” that has also triggered challenges in federal court.

U.S. Customs and Border Protection officials defend the practice on the grounds that the border crossings are not equipped to process hundreds of asylum seekers daily, and that officers must continue to facilitate ordinary cross-border travel and trade while protecting the country from terrorists and drug runners.

It is unclear how many of the migrants traveling in the Central American caravans will approach the ports of entry and attempt to enter legally. In recent weeks the wait at some crossings has stretched to several days or more, and in Tijuana the list of asylum seekers has grown to more than 1,000 people.

Those delays increase the chances that caravan members could attempt to cross illegally by fording the Rio Grande or trekking through the desert to set foot on U.S. soil and surrender to Border Patrol agents.

Separately on Thursday, a federal appeals court in California ruled that Trump cannot immediately end the Deferred Action for Childhood Arrivals program that shields from deportation young immigrants who were brought to the country illegally as children or lack permanent legal status. The unanimous decision by a three-judge panel of the U.S. Court of Appeals for the 9th Circuit increases the likelihood that the fate of nearly 700,000 “dreamers” will be settled by the Supreme Court.

Trump said he would allow the program to expire, after Texas and other states threatened to sue to force an end to protections.

The asylum restrictions announced Thursday will cite executive powers under Section 212(f) of the Immigration and Nationality Act, the same provision Trump asserted to bar foreigners from certain Muslim-majority countries from coming to the United States under the travel ban. That executive action drew multiple legal challenges and forced the administration to issue three different iterations before a revised version was upheld by the Supreme Court on a 5-to-4 vote in June.

Kevin Appleby, a senior director at the Center for Migration Studies in New York, said the announcement amounts to “another example of the Trump administration rewriting the law to discriminate against refugees of color from poor countries. I doubt we would see this rule,” he added, “if it was a group of Norwegians at our border.”

Maria Sacchetti, Felicia Sonmez and Robert Barnes contributed to this report.