Attorney General Jeff Sessions had threatened to withhold public safety grant money to Chicago and other so-called sanctuary cities for refusing to impose new tough immigration policies. Witness the standoff between the "sanctuary" city of Chicago and the Trump administration.
"To a degree perhaps unsurpassed by any other jurisdiction, the political leadership of Chicago has chosen deliberately and intentionally to adopt a policy that obstructs this country's lawful immigration system", Sessions said in a statement after the complaint was filed.
Trump announced last week that he would phase out Dreamers' deportation protections, which were provided under the 5-year-old Barack Obama administration's deferred-action program.
Leinenweber, in his 41-page ruling, said that the city could suffer "irreparable harm".
The grant at issue is called the Edward Byrne Memorial Justice Assistance Grant, and the funds benefit law enforcement.
25 killed in Malaysia school fire
Firefighters rushed to the scene and the blaze was out within an hour but it wreaked bad devastation. Seven people were now being treated at the hospital, four of them for serious injuries.
The ruling is a fresh blow to US President Donald Trump, who has promised to end illegal immigration and so-called "sanctuary cities".
In a news conference, Emanuel praised the ruling as an "affirmation of the rule of law". And it has made a similar argument if the city were to follow the new requirements. Cautioning that the Justice Department's approach could cause "irreparable harm", he also pointed to concerns over mistrust between the public and law enforcement.
With the White House seeking to curb immigration across the nation, cities have found themselves on the front lines of a dispute over public safety.
Trump's opponents also say there is no correlation between immigration and violent crime, citing a sharp drop in homicides in Los Angeles since the early 1990s, despite embracing the sanctuary cities movement.
Local officials around the country, such as Chicago Mayor Rahm Emanuel, have insisted that by cooperating with federal immigration agents they would jeopardize the hard-won trust of immigrant communities. You would think that legal immigrants would be up in arms about this policy, but this is not the case. Leinenweber did side with the Trump administration on preserving an existing requirement for the grants - certifying compliance with a federal law that mandates local jurisdictions communicate immigration status information to the federal government - which was put in place originally by the Obama administration. The ruling is likely temporary as the law is expected to change, with Congress giving that authority to the DoJ. The injunction applies to cities nationwide.