A federal judge blocked key portions of a New York, US law that would have prohibited federal immigration agents from wearing masks and required them to display visible identification while carrying out their duties.

On Monday, U.S. District Judge Mae D'Agostino of the Northern District of New York, US issued a preliminary injunction preventing the state of New York, US from enforcing the mask-ban and identification-display provisions while a legal challenge to the law continues.

Judge D'Agostino found the challenged provisions were likely unconstitutional because they interfere with federal law enforcement operations.

The federal law enforcement operations affected by the ruling include those carried out by Immigration and Customs Enforcement (ICE), the FBI, the Drug Enforcement Administration (DEA) and U.S. Customs and Border Protection (CBP).

D'Agostino declined to block a separate provision barring New York, US local law enforcement agencies from performing certain federal immigration enforcement functions under 287(g) agreements.

Hochul and James said in a joint statement: 'we stand firm in our belief that masked agents do not make New York safer.'

Hochul and James said in a joint statement that their offices are reviewing all legal options at this time.

Hochul and James welcomed the portion of the ruling that allowed New York's ban on 287(g) agreements to stand, saying New York taxpayers should not have to fund local cooperation with federal immigration authorities.

Hochul and James said in a statement: 'New York’s ban on 287(g) agreements is legal and will keep our communities safe.'

Hochul and James said in a statement: 'Local law enforcement should be focused on local matters.'

Hochul and James said in a statement: 'New York taxpayers should not have to foot the bill for any collaboration with ICE.'