New York Gov. Andrew Cuomo has signed a bill aimed at preventing federal authorities from carrying out civil arrests without a judicial warrant on immigrants attending proceedings in court.

“New York’s courts will no longer be hunting grounds for federal agents attempting to round-up and initiate deportation proceedings against immigrants,” said state Sen. Brad Hoylman, a sponsor of the bill, in a statement.