Ana Maria, from El Salvador, carries her one-year-old son Mateo as they walk through a field with other asylum-seeking migrants from Central America after they illegally crossed the Rio Grande river into the U.S. from Mexico, in Penitas, Texas, March 31, 2019.

Three civil rights groups filed a lawsuit on Tuesday challenging the Trump administration's new asylum rule, which bars asylum claims from most noncitizens who travel through another country on their way to the United States. The rule was published in the federal register on Tuesday and was supposed to take effect immediately.

The American Civil Liberties Union, Southern Poverty Law Center and Center for Constitutional Rights filed the suit in federal court in San Francisco. The suit alleges that the rule violates the Immigration and Nationality Act as well as federal laws governing administrative procedure.

"This is the Trump administration's most extreme run at an asylum ban yet. It clearly violates domestic and international law, and cannot stand," ACLU attorney Lee Gelernt said in a statement.

The 34-page complaint was filed on behalf of nonprofit groups that provide assistance to asylum seekers. It seeks a permanent ban on the enforcement of the rule along with a declaration that the rule is "unlawful and invalid."

The lawsuit claims that the rule "directly violates Congress's clear requirement" that noncitizens must be "firmly resettled" in a third country, and not just pass through it, for that passage to invalidate their asylum claim.

The rule also violates federal law requiring "that asylum cannot be categorically denied based on an asylum seeker's route to the United States," attorneys for the groups wrote.

The Department of Justice declined to comment.The Trump administration's new rule was announced on Monday amid furor in Washington over the treatment of migrants in detention facilities along the border.

The asylum rule has exceptions for those who applied for asylum protection in a third country and were denied it, and those who qualify as victims of a "severe form of trafficking."

WATCH: Trump considers ousting Commerce Secretary Wilbur Ross