A federal judge upheld Philadelphia’s sanctuary city policy in a ruling Wednesday that said the federal law that the Trump administration is using to try to combat sanctuaries is unconstitutional.

Judge Michael M. Baylson also delivered a spanking to President Trump and Attorney General Jeff Sessions, saying they were inaccurate in suggesting that immigrants commit more crimes than native-born Americans and that further undercut the government’s arguments against the city’s policy.

The ruling joins similar defeats for Mr. Trump in California and Chicago, where his efforts to control the spread of sanctuary cities were also rejected in courtrooms.

“We took on the federal government and won,” Philadelphia Mayor Jim Kenney said on Twitter. “This ruling prevents the White House from bullying Philadelphia into changing its policies. It’s a ruling that should make clear to Attorney General Sessions that federal grant dollars cannot be used for a political shakedown.”

Under orders from Mr. Trump last year, Mr. Sessions announced a series of conditions he said localities would have to meet if they wanted access to several Justice Department grant programs. The conditions included letting federal immigration officers into local prisons and jails, holding deportation targets for up to 48 hours for pickup by officers and complying with information-sharing requirements laid out in Section 1373 of the immigration code.

Judge Baylson rejected each of those conditions, saying Mr. Sessions didn’t have a good justification for adding them and cut too many corners along the way. Other judges in the California and Chicago cases held much the same.

But Judge Baylson, who was appointed to the federal bench by President George W. Bush, went further, saying Section 1373 itself is unconstitutional.

The judge relied heavily on a recent ruling by the Supreme Court that invalidated a federal law prohibiting states from allowing sports gambling. The justices in that case said Congress had tried to “commandeer” the states, ordering what actions they could and couldn’t take, and ruled that violated the 10th Amendment.

Judge Baylson said the same principle applies to Section 1373, which says states and localities must allow their police to exchange information with the Homeland Security Department on the citizenship or immigration status of anyone. The court on Wednesday said that, too, is an attempt to commandeer the states.

“Section 1373 violates the 10th Amendment of the Constitution,” the judge concluded.

The Trump administration called the judge’s ruling “a victory for criminal aliens in Philadelphia” and vowed to keep the legal fight going.

“The Justice Department continues to maintain that we exercised our authority, given by Congress, to attach conditions — designed to keep Americans safe — to public safety grants, and we will continue to fight to carry out the department’s commitment to the rule of law, protecting public safety and keeping criminal aliens off the streets,” said Justice Department spokesman Devin O’Malley.

Judge Baylson’s ruling affects only Philadelphia, but his reasoning is likely to be used in other cases to undercut the Trump administration.

Mr. Sessions has filed a lawsuit against California, arguing that a series of state laws are illegal because they restrict cooperation and information-sharing with federal authorities. Section 1373 is a major part of Mr. Sessions’ arguments there.

Sanctuary city policies vary. Some prohibit nearly all contact with federal immigration officials, while others decline to hold deportation targets but allow some information-sharing and will even notify Homeland Security before releasing someone sought for deportation.

Philadelphia generally declines to comply with detainers and restricts immigration officers from accessing its prisons, fearing illegal immigrants may not know their rights. The city lets inmates veto Homeland Security’s requests to meet.

The city says it fears more cooperation would sour its relationship with immigrant communities, making policing tougher.

The Trump administration says that when sanctuaries shield immigrants from pickup, officers have to go out into communities to try to arrest them, creating more dangerous conditions for all involved and risking “collateral” arrests of illegal immigrants encountered in the field.

The Justice Department said Philadelphia’s sanctuary policy protected Holston Doe, a Liberian who was convicted of sexual offenses and aggravated assault, and a 22-year-old man from Gambia who police said tried to shove his girlfriend into a hot oven.

Judge Baylson on Wednesday took particular pains to say he found no evidence that immigrant communities have higher crime rates. He said claims otherwise — which he attributed to Mr. Sessions and Mr. Trump — were inaccurate.

“There is no ‘data’ suggesting any link between ‘immigrants and crime’ in Philadelphia; to the contrary, when it comes to crime statistics overall, the [Philadelphia Police Department] is most ‘concerned’ with ‘people who were born and raised in Philadelphia,’” the judge concluded.

He did not delve into differences in crime rates between legal and illegal immigrants. One recent study, based on numbers from Arizona, suggests legal immigrants are more law-abiding than native-born Americans, while illegal immigrants have higher crime rates.

Sign up for Daily Newsletters Manage Newsletters

Copyright © 2020 The Washington Times, LLC. Click here for reprint permission.