In the latest salvo in an ongoing dispute, the Trump administration has declared that Philadelphia's "sanctuary city" policies violate federal law and given city officials two weeks to contest the ruling or lose at least $1.6 million in police funding.

The decision was outlined in a letter delivered this week to Mayor Kenney and disclosed Thursday, and followed threats earlier this year by Attorney General Jeff Sessions to cut off federal grants for Philadelphia.

Both continue the protracted battle between the administration, with its hard-line immigration policies, and city officials, who have insisted their policies on undocumented immigrants are legal and make the city safer.

In a news conference, the mayor renewed his contention that the Justice Department is overstepping its reach and signaled the city would not back down.

"This has all been about political showmanship," he said. "It comes as no surprise that they think we haven't satisfied" the grant requirements. "They won't be satisfied until we actively join them in scaring immigrants out of our cities. And we won't be doing that."

He said the Justice Department was trying to coerce the city into adopting policies that would make its citizens less safe.

As the administration's attempts to withhold broader swaths of federal funding from sanctuary cities have drawn court challenges, the department has homed in on smaller targets, such as the $1.6 million grant issued last year and already spent on initiatives including overtime and police training. Then, under President Barack Obama, the department told city officials that to keep the funds, they would have to certify they were complying with a federal law that bars cities from restricting communication with Immigration and Customs Enforcement about the immigration status of people encountered by police or other municipal agencies.

In April, under President Trump, the department notified Philadelphia, New York, Chicago and other cities that they had until the end of June to certify their compliance. In May, Sessions threatened that noncompliant cities could lose funding or be barred from receiving future grants.

A month later, Philadelphia sent its reply, arguing its sanctuary policies don't violate federal law.

Philadelphia police policy forbids officers from asking anyone's immigration status; city officials have said that when officers inadvertently learn that information, it is recorded in a police report only when that person is suspected of a crime. That's to protect victims and witnesses of crimes who would otherwise be afraid to come forward, they say.

Philadelphia police upload reports to crime databases that immigration agents can access, so it isn't restricting communications with ICE, the city argued this year.

In its letter Wednesday, the Justice Department contended the city's policy of not informing ICE when an inmate or detainee is released from custody does violate federal law.

The department wrote that the city's policy of not sharing the immigration status of victims of crime also breaks the law. It's not policy to track the immigration status of crime victims, but some victims, they argued, are also perpetrators of crime and should have their status shared with the federal government.

"That makes absolutely no sense," City Solicitor Sozi Pedro Tulante said Thursday, adding that city policy dictates cooperation with federal law enforcement in all criminal investigations — of "immigrants and nonimmigrants alike, even if that person happens to be a crime victim."

Of the localities whose compliance was questioned this year, Milwaukee, Miami-Dade County, the state of Connecticut, and Clark County, Nev., were later deemed compliant. Those found to still be in violation were Cook County, Ill.; Chicago; New Orleans; New York; and Philadelphia.

The department did not specify what would happen if it those cities do not successfully contest the decision by the Oct. 27 deadline.

Philadelphia is also suing the administration over requirements for policing grants that Sessions imposed on cities in July aimed at punishing sanctuary cities. That case is pending.