CHICAGO ( — Attorney General Jeff Sessions can’t follow through — at least for now — with his threat to withhold public safety grant money to so-called sanctuary cities for refusing to impose new tough immigration policies, a judge ruled Friday in a legal defeat for the Trump administration.

In what is at least a temporary victory for several cities in California and across the U.S. that have defied Sessions, U.S. District Judge Harry Leinenweber ruled that the Justice Department could not impose the requirements.

READ MORE: Three Takeaways From Dodgers 2021 Season, NLCS

Latest Coverage: The Sanctuary City Debate

Leinenweber said Chicago, which filed the lawsuit, had shown a “likelihood of success” in arguing that Sessions exceeded his authority with the new conditions. Among them are requirements that cities notify immigration agents when someone in the country illegally is about to be released from local jails and to allow agents access to the jails.

The city had asked the judge for a “nationwide” temporary injunction this week, asking the judge not to allow the Justice Department to impose the requirements until the city’s lawsuit against the department plays out in court.

In a recent court hearing, attorneys representing Chicago said that more than 30 other jurisdictions across the United States filed court briefs supporting Chicago’s lawsuit and have up to $35 million in grants at stake. At least seven cities and counties, including Seattle and San Francisco, as well as the state of California, are refusing to cooperate with the new federal rules.

Whether or not Friday’s ruling means that Leinenweber will ultimately decide in favor of the city of Chicago is unclear.

READ MORE: 3 Shot In Downtown LA, 1 Dead

In early August, Sessions moved to punish San Bernardino and three other so-called sanctuary cities, threatening to deny them federal crime-fighting resources if they don’t step up efforts to help detain and deport people living in the country illegally.

At the time, the Justice Department sent letters to cities struggling with gun violence, telling them they will be ineligible for a new program that aims to root out drug trafficking and gang crime unless they give federal immigration authorities access to jails and provide advance notice before releasing someone in custody who is wanted on immigration violations.

The cities — San Bernardino, Stockton, Baltimore and Albuquerque — all expressed interest in the Justice Department’s new Public Safety Partnership, which enlists federal agents, analysts and technology to help communities find solutions to crime.

Along with San Bernardino, other sanctuary cities in the Southland include Santa Ana and Malibu.

In April, the California Senate approved Senate Bill 54, which would prohibit local law enforcement from cooperating with federal immigration authorities, creating a border-to-border sanctuary. The bill is currently before the state Assembly. Los Angeles County Sheriff Jim McDonnell has come out in opposition of the bill.

MORE NEWS: Man Accidentally Discharges Gun, Wounds Neighbor

(© Copyright 2017 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report.)