Texas Gov. Greg Abbott on Monday signed a new law giving police the authority to arrest migrants who cross the border illegally. 

At the signing ceremony, Gov. Abbott said the goal of Senate Bill 4 was to "stop the tidal wave of illegal entry into Texas." 

Once in custody, migrants 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 comply could face arrest again under more serious felony charges.

Texas Gov. Greg Abbott

Texas Gov. Greg Abbott speaks to students, parents and staff at Nolan Catholic High School while trying to build support for his school choice plan on Wednesday, April 19, 2023. (Amanda McCoy/Fort Worth Star-Telegram/Tribune News Service via Getty Images) (Amanda McCoy/Fort Worth Star-Telegram/Tribune News Service via Getty Images)

The move marks a dramatic step by the Republican governor to police immigration. Abbott has repeatedly slammed the Biden administration for not doing enough to address the border crisis. Texas has bused more than 65,000 migrants to cities across America and installed razor wire along the banks of the Rio Grande.

The law is likely to face legal challenges as immigration enforcement is a federal responsibility. Opponents, meanwhile, have called the measure the most 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. 

WHERE NO CONGRESS HAS GONE BEFORE: FACING GALACTIC-SCALE FISCAL CLIFF AND BORDER SECURITY THREATS

Thirty former U.S. immigration judges, who served under both Republican and Democratic administrations, signed a letter this month condemning the measure as unconstitutional.

Mexico also rebuked the measure. Under bilateral and international agreements, Mexico is required to accept deportations of its citizens, but not those of other countries. Under the Texas law, migrants ordered to leave would be sent to ports of entry along the border with Mexico, even if they are not Mexican citizens.

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)

"The Mexican government categorically rejects any measure that would allow local or state authorities to detain or deport Mexicans or other nationalities to Mexican soil," Mexico's foreign relations department wrote in a statement.

A White House spokesperson derided the new law as "extreme" and argued that it "will make communities in Texas less safe." 

"Generally speaking, the federal government — not individual states — is charged with determining how and when to remove noncitizens for violating immigration laws," the spokesperson said. 

Fox News Digital has reached out to Gov. Abbott’s office for further comment. 

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.