Judge Mary Rosado on Monday declared Adams' Executive Order 50 "null and void" - calling it an "impermissible appearance of a conflict of interest" as it came on the heels of the Justice Department's dismissal of his criminal case with prejudice.
The mayor had signed the executive order earlier this year as a move that would allow federal agents into the jail complex to assist in criminal investigations.
Critics called it a slippery slope to civil rights violations.
The city says it's planning to appeal ruling.
----------
* Get Eyewitness News Delivered
* More New York City news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube