An app that lets people track the location of Hong Kong police is now available on the App Store.

Apple initially rejected the app on the ground it "enables and encourages" illegal activity, but reversed the decision.

In a tweet on Friday, the app's anonymous developer said Apple had "finally made the right decision" and would not be making "any further comments on this matter."

Visit Business Insider's homepage for more stories.

Apple has approved an app that lets people track the movements of Hong Kong police and avoid potentially dangerous areas amid ongoing unrest in the territory, reversing course on an initial decision to reject the app that had led to widespread criticism of the company.

HKmap Live is an anonymously developed, crowd-sourced app that provides users with alerts on protesters' activity, displays locations of police vehicles, and tracks tear-gas usage. As well as now being available on the App Store, it is also available on the Google Play Store. The app is a mobile version of a preexisting website, hkmap.live. (The BBC previously reported that the app had been approved by Apple.)

Apple initially rejected the anonymous developer's request to put the app on the App Store on the grounds it "facilitates, enables, and encourages an activity that is not legal," the developer wrote on Twitter on October 1. Apple's rejection notice to the developer added that "specifically, the app allowed users to evade law enforcement," they said.

But on Friday, the HKmap Live was approved, with the app's anonymous developer tweeting that Apple had "finally made the right decision." They added: "We understand Apple have many business considerations, but since they already make thing right I don't see any point to keep pressing [sic]."

In a tweet two days later, the developer said Apple had "received 0 legal complaint[s]" regarding the app's availability.

The decision is a notable about-face from Apple, which has absolute control over what apps are and aren't allowed on its App Store. And it opens the company up to the possibility of repercussions in China, which is an important market for the California tech giant and whose government has been increasingly irked by the Hong Kong protests.

There had previously been significant criticism of Apple's decision to reject the app, with some pointing to Google-owned traffic app Waze as another service that effectively helps its users avoid the police by alerting them to law enforcement's presence but is allowed by Apple.

Protests are ongoing in Hong Kong, with residents taking to the streets to demand civil liberties and protections from China's authoritarian government. Last week, a protester was shot in the chest by a police, and on Friday leader Carrie Lam announced the government had banned face masks in an attempt to clamp down on dissent.