ICE agents in New York can’t be banned from wearing masks, according to a federal-court ruling that smacks down one of state’s new sanctuary policies.

Masked federal agents wait outside an immigration courtroom in New York last summer. AP Photo/Olga Fedorova

Obama-appointed Judge Mae D’Agostino on Monday granted a temporary injunction of the law on the constitutional grounds that states can’t place rules on federal agencies — a blow for Gov. Kathy Hochul and lefty Albany pols who clamored to slap together a boatload of new sanctuary-state policies in response to President Trump’s immigration crackdown earlier this year.

Start your day with all you need to know

Morning Report delivers the latest news, videos, photos and more.

Thanks for signing up!

“New York cannot impose its own uniform requirements on federal agents simply because it disagrees with how the Federal Government is exercising its authority,” D’Agostino wrote in her opinion.

“Because the Face Covering and Identification Acts take direct aim at regulating the federal agents in their function of enforcing federal law, the Court finds these provisions likely run afoul of the intergovernmental immunity doctrine,” added D’Agostino, an appointee of former President Barack Obama, in her 51-page order.

A masked federal agent is seen in the Jacob K. Javits Federal Building in Manhattan in July 2025. Adam Gray for New York Post

The Trump administration cheered the ruling, which was built upon several others striking down similar laws, most notably one meant to unmask ICE agents in California.

“Laws banning federal agents from wearing protective masks are unconstitutional,” the Department of Justice wrote in a statement.

“This Department of Justice is focused on law and order, public safety, and will not tolerate any violence directed toward law enforcement officials working tirelessly to keep Americans safe.”

Still, D’Agostino lauded Democrats’ sanctuary measures as “well-intentioned” and refused to grant the feds an injunction to block another ICE-related New York ban — on localities striking formal so-called 287(g) cooperation agreements with the federal immigration agency.

Agents will be allowed to continue to wear face masks under a new court ruling. Adam Gray for New York Post

“Defendants’ perspective is grounded in unavoidable observations of recent troubling events which loom darkly over the public perception of the manner in which federal immigration law is enforced,” she wrote, referring to pro-mask-ban officials.

Hochul, in a joint statement with state Attorney General Letitia James, tried to spin the decision as a win for her overall sanctuary-state agenda.

“As we have said from the start, New York’s ban on 287(g) agreements is legal and will keep our communities safe. Local law enforcement should be focused on local matters,” she said.

That ban is set to go into effect Aug. 25, requiring several counties such as Nassau on Long Island to drastically limit their cooperation with the feds.

The state is “reviewing all legal options” to continue pursuing the mask ban, Hochul and James added in their statement.