PHOTO: Facebook/SFPD
Now playing
02:01
This case sparked a sanctuary city debate
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
PHOTO: Richard Drew/AP
President Donald Trump addresses the 73rd session of the United Nations General Assembly, at U.N. headquarters, Tuesday, Sept. 25, 2018. (AP Photo/Richard Drew)
Now playing
01:17
Trump to migrants: Make your nations great again
Central American immigrants depart ICE custody, pending future immigration court hearings on June 11, 2018 in McAllen, Texas. Thousands of undocumented immigrants continue to cross into the U.S., despite the Trump administration's recent "zero tolerance" approach to immigration policy.  (Photo by John Moore/Getty Images)
PHOTO: John Moore/Getty Images
Central American immigrants depart ICE custody, pending future immigration court hearings on June 11, 2018 in McAllen, Texas. Thousands of undocumented immigrants continue to cross into the U.S., despite the Trump administration's recent "zero tolerance" approach to immigration policy. (Photo by John Moore/Getty Images)
Now playing
01:06
Judge blocks asylum seekers from deportation
PHOTO: Pool
Now playing
01:51
Trump: I prefer shutdown before midterms
CHICAGO, IL - JUNE 29:  Demonstrators hold a rally in the Little village neighborhood calling for the elimination of the U.S. Immigration and Customs Enforcement (ICE) and an end to family detentions on June 29, 2018 in Chicago, Illinois. Protests have erupted around the country recently as people voice outrage over the separation and detention of undocumented children and their parents.  (Photo by Scott Olson/Getty Images)
PHOTO: Scott Olson/Getty Images North America/Getty Images
CHICAGO, IL - JUNE 29: Demonstrators hold a rally in the Little village neighborhood calling for the elimination of the U.S. Immigration and Customs Enforcement (ICE) and an end to family detentions on June 29, 2018 in Chicago, Illinois. Protests have erupted around the country recently as people voice outrage over the separation and detention of undocumented children and their parents. (Photo by Scott Olson/Getty Images)
Now playing
01:30
HHS refusing to release family separation stats
Now playing
01:01
Reporter to Sarah Sanders: Why did Trump lie?
Now playing
01:28
Trump: ICE agents are mean but have heart
PHOTO: Pool
Now playing
01:23
Trump: Our facilities better than Obama's
trump king of jordan visit
PHOTO: CNN
trump king of jordan visit
Now playing
01:15
Trump: No regrets signing executive order
Immigrant children walk in a line outside the Homestead Temporary Shelter for Unaccompanied Children, a former Job Corps site that now houses them, on Wednesday, June 20, 2018, in Homestead, Fla. (AP Photo/Brynn Anderson)
PHOTO: Brynn Anderson/AP
Immigrant children walk in a line outside the Homestead Temporary Shelter for Unaccompanied Children, a former Job Corps site that now houses them, on Wednesday, June 20, 2018, in Homestead, Fla. (AP Photo/Brynn Anderson)
Now playing
01:54
Children in limbo after Trump executive order
Secretary of State Mike Pompeo listens as President Donald Trump speaks during a cabinet meeting at the White House, Thursday, June 21, 2018, in Washington. (AP Photo/Evan Vucci)
PHOTO: Evan Vucci/AP
Secretary of State Mike Pompeo listens as President Donald Trump speaks during a cabinet meeting at the White House, Thursday, June 21, 2018, in Washington. (AP Photo/Evan Vucci)
Now playing
02:18
White House chaos over immigration reversal
Watched by Homeland Security Secretary Kirstjen Nielsen (L) and Vice President Mike Pence, US President Donald Trump signs an executive order on immigration in the Oval Office of the White House on June 20, 2018 in Washington, DC. - US President Donald Trump on Wednesday signed an executive order aimed at putting an end to the controversial separation of migrant families at the border, reversing a harsh practice that had earned international scorn."It's about keeping families together," Trump said at the signing ceremony. "I did not like the sight of families being separated," he added. (Photo by Mandel Ngan / AFP)        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
PHOTO: MANDEL NGAN/AFP/Getty Images
Watched by Homeland Security Secretary Kirstjen Nielsen (L) and Vice President Mike Pence, US President Donald Trump signs an executive order on immigration in the Oval Office of the White House on June 20, 2018 in Washington, DC. - US President Donald Trump on Wednesday signed an executive order aimed at putting an end to the controversial separation of migrant families at the border, reversing a harsh practice that had earned international scorn."It's about keeping families together," Trump said at the signing ceremony. "I did not like the sight of families being separated," he added. (Photo by Mandel Ngan / AFP) (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
02:49
What's next after Trump's policy reversal?
Trump meeting 06202018
PHOTO: POOL
Trump meeting 06202018
Now playing
02:33
Trump reverses position on family separations
President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
PHOTO: Pablo Martinez Monsivais/AP
President Donald Trump signs an executive order to keep families together at the border, but says that the 'zero-tolerance' prosecution policy will continue, during an event in the Oval Office of the White House in Washington, Wednesday, June 20, 2018. Standing behind Trump are Homeland Security Secretary Kirstjen Nielsen, left, and Vice President Mike Pence. (AP Photo/Pablo Martinez Monsivais)
Now playing
01:52
Trump signs executive order to end family separations
PHOTO: CNN
Now playing
01:18
Trump: Take children away to prosecute parents
THE PRESIDENT meets with the National Space Council  In-House Pool (Pre-set 9:30AM | Final Gather 11:15AM -- Palm Room Doors)
PHOTO: Pool
THE PRESIDENT meets with the National Space Council In-House Pool (Pre-set 9:30AM | Final Gather 11:15AM -- Palm Room Doors)
Now playing
01:40
Trump: The US will not be a migrant camp
(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.