Three civil rights and advocacy groups filed a federal lawsuit Tuesday challenging the Trump administration’s latest move to widely restrict asylum for migrants coming to the southern border.

"This is the Trump administration’s most extreme run at an asylum ban yet," Lee Gelernt, deputy director of the Immigrants' Rights Project at the American Civil Liberties Union, said in a statement announcing the lawsuit. "It clearly violates domestic and international law, and cannot stand."

The ACLU was joined by the Southern Poverty Law Center and the Center for Constitutional Rights in the lawsuit, which was filed in the U.S. District Court for the Northern District of California. The suit was filed on behalf of immigrant rights groups — the East Bay Sanctuary Covenant, Al Otro Lado, Innovation Law Lab and the Central American Resource Center in Los Angeles.

"This is the latest — and deeply dangerous — effort by the Trump administration to inflict maximal cruelty on vulnerable people fleeing desperate conditions for safety here," Baher Azmy, the legal director for the Center for Constitutional Rights, said in the statement.

The lawsuit is asking for a declaration "that the interim final rule is unlawful and invalid," as well as a preliminary and permanent injunction stopping its implementation and enforcement.

On Monday, the Trump administration announced the rule broadly restricting asylum for migrants who pass through another country on their journey to the United States but do not attempt to seek asylum there first.

The sweeping change was President Donald Trump’s latest policy aimed at restricting the influx of Central American families seeking asylum at the southern border but could affect many of the migrants traveling from around the world who come to the U.S.-Mexico border.

The rule, published Tuesday in the Federal Register, was set to go into effect immediately and applies to migrants who enter or arrive at the U.S. border on or after the effective date.

Two other civil rights groups, the Refugee and Immigrant Center for Education and Legal Services (RAICES) and Capital Area Immigrants' Rights (CAIR) Coalition, filed suit against the Trump administration's policy Tuesday.

Claudia Cubas, CAIR Coalition’s Litigation Director, said in a news release that the suit aims to allow refugees to apply for asylum "according to what our laws say not the way the Attorney General seeks to rewrite them."

"This new rule will harm not only the many asylum seekers we serve in the Washington Metropolitan area but impairs our ability as an organization to help them," Cubas said. "Many of the countries that our clients pass through to get to the United States are as dangerous if not worse than their home countries. This rule ignores this reality."

Acting Homeland Security Secretary Kevin McAleenan said in a statement Monday announcing the new interim final rule that it “will help reduce a major 'pull' factor driving irregular migration to the United States and enable DHS and DOJ to more quickly and efficiently process cases originating from the southern border, leading to fewer individuals transiting through Mexico on a dangerous journey.”

Attorney General William Barr called the interim final rule a "lawful exercise of authority provided by Congress to restrict eligibility for asylum."

McAleenan and Barr are both named in the lawsuit, as well as acting Director of U.S. Citizenship and Immigration Services Ken Cuccinelli, acting Commissioner of Customs and Border Protection John Sanders, and acting Director of Immigration and Customs Enforcement Matthew Albence.

The Department of Homeland Security said the policy addresses an issue that has contributed to a surge in illegal migration.

"Currently, we have many individuals who seek to exploit our asylum laws by making meritless claims. As the Department has said before, economic or personal reasons are not legitimate grounds for claiming asylum and these claims only hurt legitimate asylum seekers in need of humanitarian assistance," a spokesperson for the department said in a statement Tuesday night. "By requiring immigrants, with limited exceptions, to seek asylum in at least one safe country they travelled through en route to the U.S., fewer individuals will make the dangerous journey through Central America and Mexico, helping our front-line operators to continue their normal processing more quickly and efficiently.”

The Department of Justice declined comment.

In the past, federal judges have blocked other attempts by the administration to change the asylum policy, most notably the president's effort to deny the protection to anyone who did not enter the U.S. through a legal port of entry.

The rule has three limited exceptions, for migrants who were denied asylum in at least one other country before the U.S., migrants who can show they meet the definition of a "victim of a severe form of trafficking in persons,” or migrants who came to the U.S. through countries which are not parties to three international treaties regarding asylum and refugees.

The rule does not prevent migrants for two different forms of protection, withholding of removal or relief under the Convention against Torture. Those forms of relief face a much higher standard of proof than the standard in credible fear interviews, the first step in the asylum process, and are more limited forms of relief than asylum.

The change is a unilateral move by the Trump administration and has not been agreed to by Mexico. American officials were negotiating a similar deal with Guatemala, which would have required immigrants from El Salvador and Honduras to apply for asylum there. But that deal, and a meeting with Guatemalan President Jimmy Morales, was abruptly called off Sunday after the Guatemalan Constitutional Court ruled against the proposal.

Immigrant rights groups denounced the rule as the “most egregious” and “extreme” policy proposed by the president targeting asylum.

Under U.S. and international law, a person may seek asylum based on persecution or a well-founded fear of future persecution because of race, religion, nationality, political opinion or membership in a particular social group. As a signatory to an international asylum treaty, the U.S. has a legal obligation to provide protection and certain rights to people who arrive at the border seeking asylum.