A judge blocked New York City’s mayor from letting federal immigration authorities reopen an office at the city’s main jail, in part because of concerns the mayor invited them back in as part of a deal with the Trump administration to end his corruption case.

New York Judge Mary Rosado’s decision Friday is a setback for Democratic Mayor Eric Adams, who issued an executive order permitting U.S. Immigration and Customs Enforcement and other federal agencies to maintain office space at the Rikers Island jail complex. City lawmakers filed a lawsuit in April accusing Adams of entering into a “corrupt quid pro quo bargain” with the Trump administration in exchange for the U.S. Justice Department dropping criminal charges against him.

Rosado temporarily blocked the executive order in April. In granting a preliminary injunction, she said city council members have “shown a likelihood of success in demonstrating, at minimum, the appearance of a quid pro quo whereby Mayor Adams publicly agreed to bring Immigration and Customs Enforcement (”ICE”) back to Rikers Island in exchange for dismissal of his criminal charges.”