Attorneys for the American Civil Liberties Union and other immigrant advocacy groups filed suit Friday in the Northern District of California to block the Trump administration’s plan to deny asylum protections to migrants who cross the Mexico border illegally.

The suit accuses the administration of attempting to violate the Immigration and Nationality Act and the Administrative Procedure Act, alleging that Trump administration officials have improperly rushed to implement the new restrictions while also asserting executive powers that lie beyond the scope of what the Supreme Court upheld in its “travel ban” decision this year.

The suit came hours after Trump issued a decree Friday morning that set in motion his administration’s effort to close off asylum benefits for those who enter the United States illegally. The measures are to take effect Saturday.

“The asylum ban is not justified by events on the ground, puts lives in danger and is patently unlawful,” said Lee Gelernt, an ACLU attorney. “The administration is flagrantly ignoring a federal statute and bypassing the most basic procedural requirements governing the issuance of new laws.”

Administration officials have anticipated the lawsuits, and the possibility that lower courts will side with the plaintiffs. The administration has suffered repeated defeats in district courts in California, but administration officials view the rulings as necessary hurdles to reach the Supreme Court, which by a 5-to-4 vote in June upheld a revised version of the travel ban that sought to block foreigners from several Muslim-majority nations from entering the United States.

Under the new measures, announced by administration officials Thursday, Trump seeks to exercise the same emergency authority invoked during his “travel ban” of early 2017 to bar anyone crossing the Mexico border illegally from qualifying for asylum.

Protections for asylum seekers will remain available to those who apply at official border crossings, or U.S. ports of entry, and the restrictions would not apply to underage asylum seekers who arrive without a parent or guardian.

In his proclamation, Trump said the measures were necessary to prepare for the arrival of thousands of Central Americans traveling in groups through Mexico toward the U.S. border with what he said was no apparent “lawful basis for admission into our country.”

“The arrival of large numbers of aliens will contribute to the overloading of our immigration and asylum system and to the release of thousands of aliens into the interior of the United States,” the proclamation states.

“The continuing and threatened mass migration of aliens with no basis for admission into the United States through our southern border has precipitated a crisis and undermines the integrity of our borders,” it continues. “I therefore must take immediate action to protect the national interest, and to maintain the effectiveness of the asylum system for legitimate asylum seekers who demonstrate that they have fled persecution and warrant the many special benefits associated with asylum.”

Asylum claims have increased fourfold since 2014, compounding a backlog of more than 750,000 cases in U.S. immigration courts.

The Trump administration’s emergency restrictions would still allow those seeking refuge to potentially qualify for a lesser legal status known as “withholding of removal” that would spare them, on a provisional basis, from deportation.

That status would not provide a chance at legal permanent residency or citizenship, but it would give those who enter illegally a way to avoid being sent back to Central America if they can convince a U.S. asylum officer that they face a “reasonable fear” of persecution.

According to the White House proclamation issued Friday, the asylum restrictions will remain in effect for 90 days and would terminate if the government of Mexico agrees to a long-standing U.S. request to allow Immigration and Customs Enforcement to deport Central Americans to Mexico if they have entered from Mexican territory.

The Mexican government has given no indication it plans to do so.

An estimated 7,000 to 10,000 Central Americans are currently en route through Mexico in “caravan” groups, the largest of which is preparing to depart Mexico City after resting several days at a sports complex there.

Mexican authorities say nearly 5,000 migrants are traveling with that group, the vast majority of whom are from Honduras, where the caravan originated. More than 1,700 are younger than 18, and at last 300 are younger than 5.

Many say they are fleeing gang violence or death threats and plan to request humanitarian protections in the United States. Others acknowledge they are seeking jobs or reunion with family members — motivations that would not qualify them for asylum under U.S. law.

The group is planning to travel more than 1,000 miles to the U.S. border crossing at Tijuana, a journey that could take several weeks if caravan members continue walking and hitchhiking most of the way.

Large numbers of Central Americans already are lined up in informal queues in the Tijuana area, because U.S. customs officers limit the number of asylum seekers allowed to approach the border crossing each day, citing capacity and personnel limits.

Senior administration officials gave no indication they plan to increase resources and personnel in the San Diego area to cope with a potentially large increase in the number of people approaching the ports of entry.

One Department of Homeland Security official, speaking on the condition of anonymity at his agency’s insistence, criticized the caravan’s decision to take a much longer route toward San Diego, instead of approaching the U.S. border in South Texas, which is much closer geographically.

“The premise that individuals who are supposed to be fleeing persecution with legitimate claims of persecution would make a decision to, instead of presenting themselves for protection in Mexico or at the closest U.S. ports of entry, travel an additional 1,000 miles to a specific port of entry to pursue their claim calls into question the legitimacy” of that claim, the official said.

The longer route to Tijuana is considered safer for migrants who cannot afford a smuggling guide. Shorter routes to the Rio Grande Valley along the Texas border are under the control of criminal groups who routinely kill and kidnap those who do not pay tolls for passing through territory under their control.