TRENTON, N.J. (AP) — New Jersey prisons and jails can no longer enter into contracts to detain immigrants who aren’t United States citizens under a law Gov. Phil Murphy signed on Friday.

Murphy announced the new law in an email and without any additional comment.

READ MORE: Pennsylvania High Court OKs 'Comfort Dogs' For Witnesses

Immigrant rights groups and the American Civil Liberties Union pushed for the legislation and lauded it.

“This hard-fought victory reflects the resilience and tenacity of our communities — and reaffirms that our vision of a world without detention is within reach,” said Tania Mattos, policy and Northeast monitoring manager with the advocacy group Freedom for Immigrants in a statement.

The law follows news reports that showed jails in northern New Jersey had contracted with U.S. Immigration and Customs Enforcement. Those reports led to protests from immigrant rights groups, culminating in the the legislation, which was introduced in January.

“It is the responsibility of the State to protect the health and safety, including the physical and mental health, of individuals detained within New Jersey,” declares the text of the legislation. “Detention centers and correctional facilities in New Jersey have a history of poor conditions, including inadequate medical and mental health care, use of isolated confinement, and incidents of violence and retaliation against people in detention.”

READ MORE: Woman Killed After Shooting Inside Kensington Home, Police Say

A spokesman for ICE in Newark declined to comment on the new law.

It’s unclear how many detainees, if any, could be affected by the law.

Essex County said earlier this year it would end its contract with the agency. Hudson County officials voted late last year to extend a contract for up to a decade after earlier saying they’d end the agreement. Bergen County also already houses detainees.

There are currently 26 people being detained at Bergen County jail, according to ICE, with 106 people at the privately run Elizabeth Detention Center. It’s unclear how many are in Hudson County.

MORE NEWS: Cars Towed, Scrapped In Wilmington Leads To Federal Lawsuit

(© Copyright 2021 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)