New legislation in New York will bar federal immigration agents from making arrests inside state courthouses without a judicial warrant, a move seen as pushback against President Trump's hardline immigration policies. 

The Protect Our Courts Act, signed Tuesday, comes amid concerns from immigration advocates that fears of being arrested deter undocumented immigrants from making court appearances. The bill prevents Immigration and Customs Enforcement (ICE) agents without a warrant signed by a federal judge, from arresting anyone inside a statehouse, or those going to or leaving a court proceeding.

"Unlike this federal government, New York has always protected our immigrant communities," N.Y. Gov. Andrew Cuomo said in a news release. "This legislation will ensure every New Yorker can have their day in court without fear of being unfairly targeted by ICE or other federal immigration authorities." 

ICE: THE HISTORY OF US IMMIGRATION AND CUSTOMS ENFORCEMENT

The law doesn't prevent a judge from issuing an arrest warrant. 

In a statement, an ICE spokesperson told Fox News the agency was reviewing the law but noted that its agents carry out arrests in courthouses in a "professional manner against specific, targeted aliens with a final removal order or those who pose a public safety threat, some of whom have multiple criminal convictions."

"Restricting ICE’s access to courthouses only increases risk to public safety and subjects the public to more visible enforcement efforts, because it forces ICE law enforcement officers to make arrests out in the community rather than the controlled environment of a courthouse," the statement continued. 

The presence in courthouses of Immigration and Customs Enforcement (ICE) agents, who are trying to take undocumented immigrants into custody, has created friction between judges and the Department of Homeland Security. 

"Today New York state made sure that our courthouses aren't a target for ICE's deportation machine, and sent a message that New York protects its immigrant families," said Donna Lieberman, the executive director of the  New York Civil Liberties Union. 

In June, a Manhattan federal judge ordered ICE to stop making arrests at state courthouses, saying the agency's tactics amounted to "disrupting and intimidating intrusions."

"For too long, ICE has conducted raids with impunity -- misleading people by pretending they are local police, and taking advantage of the court system to advance its deportation agenda," said Mizue Aizeki, interim executive director for the New York-based Immigrant Defense Project. 

In 2019, ICE made 173 arrests at state courthouses, much higher than the 28 made in 2016, before Trump took office, according to an Immigrant Defense Project report. 

CLICK HERE TO GET THE FOX NEWS APP

In a statement, Democratic state lawmakers praised the law as a crucial step toward pushing back on Trump's tough immigration agenda. 

"This new law is a powerful rebuke to the outgoing Trump administration and their immigration policies that have undermined our judicial system," said bill sponsor Sen. Brad Hoylman. "After today, New York's courts will no longer be hunting grounds for federal agents attempting to round-up and initiate deportation proceedings against immigrants."

Fox News' Nick Givas contributed to this report.