A judge blocked the Justice Department's attempt to withhold law enforcement funding from so-called sanctuary cities.
The City of Chicago sued Attorney General Jeff Sessions after he promised to withhold funding from cities that didn't cooperate when federal authorities told them to detain people suspected of immigration violations.
This ruling only gives Chicago a preliminary injunction, but the judge said the city showed a "likelihood of success" that it could prove Sessions overstepped his bounds with the punishments.
The Justice Department funding would have been just a small fraction of Chicago's overall budget, but Mayor Rahm Emanuel said it was important for the city to maintain its "status as a welcoming city" to immigrants.
Though the court case took place in Chicago, the ruling shields sanctuary cities across the country. The federal government hasn't yet said whether it will appeal the ruling.