U.S. District Judge Michael Baylson has ruled that the Trump administration cannot cut off grants to Philadelphia over the way the city deals with immigrants in the country illegally. He stated that the conditions the federal government placed on the city in order to receive the funding are unconstitutional, “arbitrary and capricious.”

The public statements of President Trump and Attorney General Sessions, asserting that immigrants commit more crimes than native-born citizens, are inaccurate as applied to Philadelphia, and do not justify the imposition of these three conditions,” Baylson wrote.

Philadelphia has said it will turn over immigrants to Immigration and Customs Enforcement only if the agency has a warrant signed by a judge. The federal requirements included allowing ICE officers access to prisons to interview people of interest, providing advanced notice of release of those people and following rules prohibiting restrictions on disclosure of any person’s immigration status.

The city has also said that the requirements on federal grant spending were unconstitutional and that following them would promote a perception in the community that it was serving as an arm of federal immigration enforcement. City attorneys had argued that would create a barrier for immigrants to seek out city services ranging from health care to calling the police when they’re victimized.