A New York state Supreme Court judge has blocked Mayor Eric Adams from reopening an office for U.S. Immigration and Customs Enforcement on Rikers Island.

Justice Mary Rosado issued her ruling on Monday, declaring the Adams administration's April 8 executive order on the matter "null and void.” Rosado said the order was invalidated due to an "impermissible appearance of a conflict of interest," with the mayor issuing the order shortly after the dismissal of his federal corruption case.

Rosado cited the Feb. 12 resignation letter of then acting U.S. Attorney for the Southern District of New York Danielle Sassoon, who wrote that Adams’ attorneys “repeatedly urged what amounted to a quid pro quo, indicating that Adams would be in a position to assist with the Department’s [immigration] enforcement priorities only if the indictment were dismissed.”

The decision comes after Rosado issued a preliminary injunction in June blocking the order, siding with the City Council, which opposed the return of federal agents to city jails.

First Deputy Mayor Randy Mastro said in a statement that the Adams administration plans to appeal the decision. In a highly unusual arrangement, the executive order to allow ICE back on Rikers Island was handed down by Mastro, rather than Adams.

“Let’s be clear: at no point does the judge dispute that the substance of our executive order fully complies with local law — that’s because it does,” Mastro said. “There is also no actual conflict of interest here, and the mayor responded to the appearance of a conflict by delegating this issue to me as his first deputy mayor — whom the judge herself described as an 'accomplished and highly educated attorney' — and I acted entirely independently of the mayor.”

Council leaders — including Speaker Adrienne Adams, Deputy Speaker Diana Ayala, Criminal Justice Committee Chair Sandy Nurse and Immigration Committee Chair Alexa Avilés — applauded the decision as a majority victory, adding that the decision makes the city safer.

“Trump’s political agenda of using ICE to disappear residents without due process and separate families harms our communities and undermines our collective safety,” the Council leaders said in a joint statement. “We’re pleased that the court recognized Mayor Adams and Randy Mastro’s attempt to do Trump’s bidding and betray their obligation to New Yorkers as unlawful.”

Public servants “must avoid even the appearance of impropriety,” and in cases of potential conflicts, an official must fully recuse himself entirely from the matter, Rosado wrote. Adams’ order, she wrote, amounted to a violation of city law and court precedent.

ICE was initially blocked from operating on Rikers Island in 2014, when then-Mayor Bill de Blasio signed legislation that expanded the city’s sanctuary policies and prohibited federal immigration officials from operating on the island.

Adams’ allowance of ICE to return Rikers relied on a carveout in the 2014 law. Federal law enforcement is permitted to have an office on Rikers Island as long as it’s used for criminal cases, not civil immigration enforcement.

Mayor’s office spokesperson Kayla Mamelak later told Gothamist that the mayor had “delegated” the decision to Mastro, who conducted “a thorough and independent assessment.”

Rosado said it was insufficient for Adams to delegate the task of writing the executive order to Mastro — and “farcical” to suggest that the apparent conflict of interest was negated by that decision.

“First Deputy Mayor Mastro is not independent of Mayor Adams and he was appointed and delegated the specific task of issuing Executive Order No. 50 after Mayor Adams made it publicly known his desired outcome,” Rosado wrote.

Adams should have sought guidance from the city Conflict of Interest Board about how to proceed, Rosado wrote, and he could have appointed an “independent, impartial, and insulated official” to determine whether or not to issue the executive order.

New York, over the years, has enacted a series of policies, by both law and executive order, generally limiting the use of city personnel and resources in furtherance of federal immigration enforcement, except in a narrow range of cases.

In a February interview, Phil Desgranges,  the attorney in charge of criminal law reform at the Legal Aid Society, said the ban on ICE agents at Rikers stemmed from cases where unauthorized immigrants were accused of crimes, acquitted of those offenses, and were placed into deportation proceedings anyway – because they were encountered by ICE officers operating in the jails.

“And instances like that, I think, really troubled New Yorkers,” Desgranges said. “It troubled the Legislature, and the City Council put in place protections to ensure that people would not just be summarily removed from the country because of an allegation.”