BROWNSVILLE, Texas (AP) Republican Texas Gov. Greg Abbott on Monday approved sweeping new powers that allow police to arrest migrants who illegally cross the U.S. border and give local judges authority to order them to leave the country, testing the limits of how far a state can go to enforce immigration laws.

Opponents 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. Immigration enforcement is a federal responsibility, and Texas law is also likely to face swift legal challenges.

It allows any Texas law enforcement officer to arrest people who are suspected of entering the country illegally. Once in custody, they could either then agree to a Texas judges order to leave the U.S. or be prosecuted on misdemeanor charges of illegal entry. Migrants who dont leave could face arrest again under more serious felony charges.

Abbott, who signed the new law in front of a section of border fence in Brownsville, predicted the number of people crossing illegally into Texas would drop by well over 50%, maybe 75%.

The consequences of it are so extreme that the people being smuggled by the cartels, they will not want to be coming into the state of Texas, Abbott said.

Texas Republicans have increasingly challenged the U.S. governments authority over immigration, saying President Joe Biden’s administration isnt doing enough to control the 1,950-mile (3,149-kilometer) 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, which has snagged and injured some asylum-seekers.

The U.S. government on Monday temporarily shut down two railroad border crossings in Texas to shift officers to helping process migrants. Rail operators said the closures at Eagle Pass and El Paso would hamper trade ahead of Christmas.

Troy Miller, U.S. Customs and Border Protection’s acting commissioner, said authorities are seeing unprecedented arrivals at the border, topping 10,000 crossings on some days this month. The railway closures are a response to more migrants traveling on freight trains, particularly over the last week.

Legal experts say the new Texas measure violates the U.S. governments purview over immigration enforcement, and the American Civil Liberties Union of Texas said it would challenge the measure in court. More than 20 congressional Democrats also signed a letter urging the U.S. Justice Department to sue to stop the law, known as Senate Bill 4.

SB 4 is dangerous for the people of Texas and interferes with the federal governments exclusive authority over immigration and foreign affairs,” the letter read.

Mexicos government also has rebuked the measure. Under bilateral and international agreements, Mexico is required to accept deportations of its own 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.

During debate in the Texas House in November, GOP state Rep. David Spiller pushed back against concerns that the law would be used as a dragnet to arrest immigrants statewide. He said enforcement would mostly take place in border counties and rebuffed efforts by Democrats to narrow the law, including a proposed carve-out for police on college campuses.

This is not, Round up everyone who is here illegally and ship them back to Mexico, he said.

Opponents have accused Texas Republicans of using the law as a vehicle to force the Supreme Courts new conservative majority to revisit its landmark 2012 Arizona decision. At the time, Justice Anthony Kennedy said Arizona may have understandable frustrations with immigrants who are in the country illegally but cant pursue policies that undermine federal law.