A federal judge in Philadelphia ruledagainst the Trump administration's policy of withholding law enforcement grants from so-called sanctuary cities, according to The Philadelphia Inquirer

In a 128-page ruling, U.S. District Judge Michael Baylson said Department of Justice (DOJ) law enforcement grants can't be withheld from Philadelphia because it refuses full cooperation with federal authorities on immigration, the news outlet reported.

At issue is Attorney General's stated policy of withholding federal law enforcement aid to sanctuary cities. Sessions said he'll use the power of the purse to compel cities to help federal agents detain and pursue undocumented immigrants, setting off a slew of lawsuits between DOJ and local governments.

In his ruling, Baylson said Philadelphia proved that withholding the grant money would cause irreparable damage, as part of it is used by first responders who provide life-saving naloxone to victims of opioid overdose, according to Inquirer reporter Jeremy Roebuck

The money in question was $1.5 million of a $4.4 billion city budget, according to the Inquirer.

Baylson said the city should be allowed to "deal with local issues as it sees best," according to the filing shared by Roebuck.

The judge added that the federal government should be allowed to intervene if there's a conflict between levels of government on how to proceed.

"In this case, given Philadelphia's unique approach to meshing the legitimate needs of the federal government to remove criminal aliens with the City's promotion of health and safety, there is no conflict of significance," he said.

Many large cities, notably Chicago, have butted heads with Sessions and the Trump administration over how to properly enforce federal immigration policy within their boundaries.

Federal authorities argue cities should honor detainers issued by Immigration and Customs Enforcement (ICE) — requests for local jails to hold foreign detainees until ICE can pick them up.

Local authorities say that's a violation of detainees' constitutional due process rights, opening a risk of due process lawsuits against cities.

And most cities, including Philadelphia, reject the "sanctuary" monicker, saying they don't protect criminals, immigrant or otherwise.

Baylson said it is a "misnomer" to call Philadelphia a sanctuary city.

"Philadelphia is not a sanctuary for anyone involved in criminal conduct, nor is it a sanctuary as to any law enforcement investigation, prosecution, or imprisonment after having been found guilty of a crime," he said, according to the Inquirer.

Most immigration violations are civil violations, rather than felonies or misdemeanors.

Baylson also repeated an argument used by many local authorities who say they don't want to waste law enforcement resources on immigrant communities, which have a lower crime rate than natives.

"There is no evidence on the record whatsoever that non-citizens in Philadelphia commit any more crimes than the citizens," he said.

“In Philadelphia, 2017 homicides have already eclipsed 2016’s numbers, and so-called ‘sanctuary policies’ further undermine public safety and law enforcement. The Justice Department is reviewing the ruling and determining next steps,” Devin O’Malley, a spokesman for DOJ, said in a statement following the court's decision.