Civil rights groups, including the ACLU, filed a lawsuit against the State of Texas on Tuesday over a new law that gives police the authority to arrest migrants who cross the border illegally and allows judges to order them to leave the U.S. 

The American Civil Liberties Union, its Texas branch, and the Texas Civil Rights Project claim on behalf of El Paso County and two immigrant aid groups that the new law, Senate Bill 4, is unconstitutional and preempted by federal law.

The ACLU of Texas called the law the nation’s "most extreme anti-immigration law." 

"SB4 lets police arrest people over ‘suspicions’ about immigration status and judges deport people without due process," the group said in an X post. "This is unconstitutional and will harm Black and Brown Texans the most."

ACLU of Texas argued that the law would lead to "racial profiling" and "harassment" with police stopping people because of their skin color or the language they speak. 

MANY SENATORS HAVE ALREADY LEFT TOWN AMID BORDER NEGOTIATIONS AS ILLEGAL CROSSINGS HIT RECORD

Republican Gov. Greg Abbott signed SB4 during a ceremony on the U.S. border in Brownsville on Tuesday. 

Immigration enforcement is a federal responsibility. But the law that Abbott signed allows any Texas law enforcement officer to arrest people who are suspected of entering the country illegally. Once in custody, they could either agree to a Texas judge's order to leave the U.S. or be prosecuted on misdemeanor charges of illegal entry. Migrants who don't leave could face arrest again under more serious felony charges.

Eagles Pass Texas migrants

Asylum seekers wait to be processed by U.S. Border Patrol agents after crossing the Rio Grande from Mexico into the United States on Sept. 30 in Eagle Pass, Texas. (John Moore/Getty Images)

Opponents have called the measure a dramatic attempt by a state to police immigration since a 2010 Arizona law — denounced by critics as the "Show Me Your Papers" bill — that was largely struck down by the U.S. Supreme Court.

A White House spokesperson said Tuesday that SB4 "will make communities in Texas less safe." 

SOUTHERN BORDER HIT BY RECORD NUMBER OF MIGRANT ENCOUNTERS IN A SINGLE DAY AS THOUSANDS FLOOD INTO TEXAS

Fox News Digital has reached out to Abbott's office for a response to the new lawsuit. SB4 takes effect in March. 

Republican Texas Gov. Greg Abbott

Texas Gov. Greg Abbott looks on during a news conference on March 15, 2023, in Austin, Texas. (Brandon Bell/Getty Images)

Texas Republicans, meanwhile, say the Biden administration isn't doing nearly enough to control the nearly 2,000-mile southern border. Texas has bused more than 65,000 migrants to cities across America since August 2022 and recently installed razor wire along the banks of the Rio Grande.

Fiscal Year 2023 has broken new records, with more than 2.4 million migrant encounters at the border. 

September saw a record for encounters at the southern border, while the following month saw a record for encounters in October — with more than 240,000 encounters border-wide. 

CLICK HERE TO GET THE FOX NEWS APP 

Funding for more resources at the border has stalled in recent weeks, as Republicans demand it be coupled with restrictions on asylum and the use of parole — a demand which some Democrats have balked at. 

Fox News' Adam Shaw and The Associated Press contributed to this report.