(Bloomberg) -- Apple Inc. has pulled the plug on an app that shows police activity in Hong Kong, reversing course yet again amid increasingly violent pro-democracy protests in the city.

The U.S. company said Thursday it decided to reject the application of HKmap.live after consulting with Hong Kong authorities because it could endanger law enforcement and residents in the city. That marks a return to its original position, after the iPhone maker briefly allowed the app to run.

“We have learned that an app, HKmap.live, has been used in ways that endanger law enforcement and residents in Hong Kong. Many concerned customers in Hong Kong have contacted us about this app and we immediately began investigating it,” Apple said in a statement. “The app displays police locations and we have verified with the Hong Kong Cybersecurity and Technology Crime Bureau that the app has been used to target and ambush police, threaten public safety, and criminals have used it to victimize residents in areas where they know there is no law enforcement. This app violates our guidelines and local laws, and we have removed it from the App Store.”

The reversal comes after the Chinese Communist Party’s flagship newspaper criticized Apple for letting the software through.

Apple joins other foreign companies struggling to navigate the pro-democracy movement in Hong Kong as protests that began in June show no sign of abating. The issue has become a red line for those doing business in China, most recently drawing the National Basketball Association into a firestorm over a tweet that’s caused partners to stop doing business with the league and state television to halt airing its games.

To contact the reporter on this story: Vlad Savov in Tokyo at vsavov5@bloomberg.net

To contact the editors responsible for this story: Edwin Chan at echan273@bloomberg.net, Peter Elstrom

©2019 Bloomberg L.P.