CHICAGO (AP) — A judge in Illinois dismissed a Trump administration lawsuit Friday that sought to disrupt limits Chicago imposes on cooperation between federalimmigrationagents and local police. The lawsuit, filed in February, alleged that so-calledsanctuary lawsin the nation's third-largest city "thwart" federal efforts to enforce immigration laws. Itargued that local laws run counterto federal laws by restricting "local governments from sharing immigration information with federal law enforcement officials" and preventing immigration agents from identifying "individuals who may be subject to removal." Judge Lindsay Jenkins of the Northern District of Illinois granted the defendants' motion for dismissal. Chicago Mayor Brandon Johnson said he was pleased with the decision and the city is safer when police focus on the needs of Chicagoans. "This ruling affirms what we have long known: that Chicago's Welcoming City Ordinance is lawful and supports public safety. The City cannot be compelled to cooperate with the Trump Administration's reckless and inhumane immigration agenda," he said in a statement. Gov. JB Pritzker welcomed the ruling, saying in a social media post, "Illinois just beat the Trump Administration in federal court." The Justice Department and the Department of Homeland Security and did not immediately respond to messages seeking comment. The administration has filed aseries of lawsuitstargeting state or city policies seen as interfering with immigration enforcement, including those inLos Angeles,New York City,DenverandRochester, New York. It suedfour New Jersey citiesin May. Heavily Democratic Chicago has been a sanctuary city for decades and has beefed up its laws several times, including duringTrump's first termin 2017. That same year, then-Gov. Bruce Rauner, a Republican, signed morestatewide sanctuary protections into law, putting him at odds with his party. There is no official definition forsanctuary policies or sanctuary cities. The terms generally describe limits on local cooperation with Immigration and Customs Enforcement. ICE enforces U.S. immigration laws nationwide but sometimes seeks state and local help.