NEWARK, N.J. (CBS/AP) — New Jersey’s attorney general is ordering two counties to end cooperation agreements with federal immigration authorities. Gurbir Grewal’s announcement Friday came a day after Immigration and Customs Enforcement agents arrested more than 50 people in New Jersey.

A directive this year limits law enforcement’s cooperation with ICE. But sheriff’s departments in Cape May and Monmouth counties have separate agreements to perform some immigration functions.

READ MORE: Man Wanted For Shooting Woman While Asleep In Her Apartment In Germantown, Philadelphia Police Say

Critics of New Jersey’s directive say it makes it easier for violent criminals to be released from custody before they can be handed over to immigration authorities.

Grewal said Friday the directive allows local authorities to identify dangerous individuals with enough time for ICE to detain them.

READ MORE: Amazon Partners With Grubhub To Give Prime Customers Free Meal Deliveries For 1 Year

“The goal of the Immigrant Trust Directive is clear—to make it easier for New Jersey’s law enforcement officers to solve crimes and ensure the safety of all 9 million people in our state by building trust with our large and diverse immigrant communities,” Grewal said in a statement. “Because of the bright line between New Jersey law enforcement officers and federal civil immigration agents, immigrants can come forward as victims and witnesses of crimes without fear of reprisal. Today, we’re shutting down agreements that ‘deputize’ state and local law enforcement to work as ICE agents, because they undermine that distinction, put our hard-earned trust at risk, and compromise public safety.”

Cape May County’s sheriff didn’t immediately respond to an email Friday. Monmouth County’s sheriff couldn’t immediately be reached.

MORE NEWS: Smithfield Foods Settles Pork Price-Fixing Lawsuit For $42 Million

(© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)