The ruling states the city cannot keep federal agents, including ICE, from intentionally covering their badges or using unmarked vehicles.
RELATED: Justice Department sues Philadelphia over law regulating ICE operations
The bill became law in May as part of City Council's "ICE Out" package. It takes effect on Tuesday.
Council member Kendra Brooks, who introduced the bill, issued a statement saying,
"This was a bad decision by a Trump-appointed judge, and it will not stop my work to abolish ICE."