PHILADELPHIA -- Philadelphia will stop giving U.S. Immigration and Customs Enforcement access to a real-time arrest database, accusing the agency of misusing the information to target people who are in the country illegally but are otherwise not accused of any crimes, Mayor Jim Kenney said on Friday. His decision means the city will not renew a contract that expires August 31.

"Such practices sow fear and distrust in Philadelphia's great immigrant community, and make it more difficult for our Police Department to solve crimes. I cannot in good conscience allow the agreement to continue," Kenney said, according to CBS Philadelphia.

As a "sanctuary city," Philadelphia had already limited cooperation with immigration enforcement. It won't release inmates to ICE without a judicial warrant.

Get Breaking News Delivered to Your Inbox

The Trump administration wants to cut funding to the city as a result but has so far been blocked by a judge.

"How anyone can define this as making America great again is beyond me," Kenney said.

Anyone who interacts with law enforcement is entered into the database, including those who are arrested, victims and witnesses, with limits on what ICE officers can view. Kenney said the city's conversations in recent weeks with ICE only confirmed what he had feared.

With access to the database, Kenney said ICE has been arresting otherwise law-abiding residents for immigration violations. He said it has also been targeting foreign-born residents for investigation even though there is no information on their immigration status.

Philadelphia entered into the contract in 2008, city solicitor Marcel Pratt said, and revised it in 2009 to shield witness and victim information from the agency as well as to eliminate immigration status. In a termination letter sent to ICE on Thursday, Pratt said the contract "has created the false perception that the city is willing to be an extension of ICE."

"It is not in the best interests of the city and its residents for the city to acquiesce to that perception," Pratt wrote.

The city said it has not yet received a response. ICE has previously said it would focus on immediate deportation for people in the country illegally who had felony convictions or who were suspected of felonies.

Juntos, an immigrant advocacy group, said the city's decision will reduce the ability of ICE "to disappear our loved ones and tear apart families."