Washington CNN  — 

A federal judge has once again rebuked the administration’s efforts to pressure so-called sanctuary cities, going further than any to date in using a recent Supreme Court decision to rule an existing federal law unconstitutional.

The ruling Wednesday from Judge Michael Baylson, a George W. Bush appointee, thus far applies only to his district in the Philadelphia area, but it could lay the groundwork for even more rulings that further limit what the administration can do to punish sanctuary cities – a key priority of the administration.

The decision relies, in part, on a May ruling from the Supreme Court on state gambling laws.

Baylson had already blocked the Justice Department from imposing new conditions on federal law enforcement grants that Philadelphia has received in the past, limiting his November ruling to the city, which had challenged the move by Attorney General Jeff Sessions. A federal judge in Chicago also has already blocked the new conditions nationwide, a ruling that was upheld in April by an appeals court. The effort from Sessions to impose the conditions had been an attempt to punish sanctuary cities after a federal judge in California had blocked the administration from pursuing broader funding threats.

But the ruling on Wednesday made Baylon’s earlier preliminary decision permanent, ruling that the new conditions were illegal and unconstitutional, and went further – declaring a seemingly obscure federal law that has served as the basis for a substantial amount of what the administration has sought to do on sanctuary cities unconstitutional itself.

The Justice Department released a fiery statement from spokesman Devin O’Malley blasting the ruling, calling it “a victory for criminal aliens in Philadelphia, who can continue to commit crimes in the city knowing that its leadership will protect them from federal immigration officers whose job it is to hold them accountable and remove them from the country.”

O’Malley said the department still believes, contrary to the judge’s ruling, that it acted legally, and vowed to keep fighting. The agency also released a list of criminals it said Philadelphia had released.

Sanctuary city is a catchall term used to describe jurisdictions that in some way don’t cooperate with federal immigration enforcement, especially in terms of detaining immigrants for extra time in jail so they can be picked up by federal authorities, or allowing federal agents into jails to take custody of immigrants. Federal authorities say the enforcement is necessary to keep communities safe, but some local police chiefs say they have policies against such cooperation in order to preserve local resources and maintain essential trust with immigrant communities and victims of crimes.

The Trump administration has been aggressive from its first days in trying to punish cities it deems to be sanctuaries and has used escalating rhetoric to blame those cities for violence, but it has repeatedly been rebuked by the courts, with federal judges in California, Illinois and Pennsylvania blocking various administration efforts to restrict federal funds to cities it perceives to be uncooperative.

But to date, the administration has been allowed to enforce a law referred to by its US Code number, 1373. The small, arcane piece of the Immigration and Nationality Act requires that state and local governments transmit information about individuals’ immigration status to the federal government if asked, and that no state or local governments or officials can prohibit doing so.

Until Wednesday, courts have ruled that the federal government is allowed to enforce that law – which has allowed the Trump administration to maintain one requirement on law enforcement grants already in place that cities comply with 1373, though virtually every sanctuary city maintains it is in compliance, and Baylson issued a formal order that Philadelphia is in fact compliant.

But Baylson cited a substantial ruling from the Supreme Court last month, Murphy v. NCAA, that legalized sports gambling at the state level to go further than any court to date – ruling that 1373 itself is unconstitutional. The judge wrote that because the Supreme Court had found in that case that the federal government could not prohibit states from passing certain laws, the sanctuary city law was also unconstitutional.

“Because Section 1373 directly tells states and state actors that they must refrain from enacting certain state laws, it is unconstitutional under the Tenth Amendment,” Baylson wrote.

The ruling could have a ripple effect in ongoing sanctuary city litigation around the country, where a number of cities and states have sued over administration efforts to punish them.

The Justice Department has itself filed a lawsuit, against California and its sanctuary law. That case partially rests on 1373 as a justification of federal authority.

Earlier this week, Sessions succeeded in his efforts to have the full 7th US Circuit Court of Appeals hear his appeal on the Chicago ruling, but the Justice Department challenged only the ruling from a smaller panel of 7th Circuit judges upholding that the decision could apply nationwide. It is the nationwide nature of the ruling that the full 7th Circuit Court will hear, not whether Sessions’ actions are legal or constitutional.

CNN’s Ariane de Vogue contributed to this report.