PHILADELPHIA (AP) — Philadelphia on Wednesday became the latest "sanctuary city" to sue Attorney General Jeff Sessions over what officials say are unconstitutional immigration restrictions placed on a major federal grant.

The city is asking the court to stop Sessions from adding these conditions to a its Edward Byrne Memorial Justice Assistance grant, which it uses to pay police overtime, upgrade equipment and courtroom technology and train officers.

Philadelphia's so-called "sanctuary" status has made it a frequent target of the attorney general. Sessions in July said cities and states can only receive the grants if they allow federal immigration officials to access detention facilities, and that they must provide advance notice when someone in the country illegally is about to be released.

Sessions singled out nine jurisdictions, including Philadelphia, as not complying with federal law regarding immigration policy. Chicago, Los Angeles and San Francisco also have sued over the grant conditions.

Philadelphia Mayor Jim Kenney has frequently defended the city's law enforcement approach to illegal immigration, and the municipality has maintained that it is in compliance with federal requirements. The lawsuit refers to Philadelphia's "vibrant immigrant community" as a vital part of its workforce and says the city has adopted policies "that seek to foster trust between the immigration population and city officials and employees." As a rule, Philadelphia officers do not ask residents about their immigration status.

Kenney called the conditions imposed by Sessions "purely political" and unrelated to safety.

"We will not let this administration interfere with our longstanding efforts to bring members of Philadelphia's immigrant community from the shadows," Kenney said, adding that crime is down in in the city.

Devin O'Malley, a spokesman for the U.S. Department of Justice, said the city is doing a disservice to its residents "by protecting criminal aliens rather than law-abiding citizens." He said the city should be focusing on its murder rate.

"When criminal aliens are returned to the streets instead of sent home, public safety is undermined," he said.

___

Errin Haines Whack covers urban affairs for The Associated Press. Follow her work on Twitter at http://www.twitter.com/emarvelous.