Apple on Thursday removed a Hong Kong map application used by pro-democracy protesters, saying it endangered police, after China warned the US tech giant to drop the app.

According to a statement published by the makers of HKmap.live, Apple said "your app has been used in ways that endanger law enforcement and residents in Hong Kong".

The financial hub has been gripped by protests for four months, and there have been regular clashes between hardcore demonstrators and police.

Apple's withdrawal of the application from its App Store follows an accusation from China's state media that the app "obviously helps rioters".

An opinion piece in the People's Daily, the mouthpiece of the ruling Communist Party, said on Wednesday: "Nobody wants to drag Apple into the lingering unrest in Hong Kong. But people have reason to assume that Apple is mixing business with politics, and even illegal acts.

"Apple has to think about the consequences of its unwise and reckless decision."

HKmap.live published the App Store Review's statement on its Telegram channel, which has more than 70,000 subscribers.

"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 victimise residents in areas where they know there is no law enforcement," the statement said.

"This use of your app has resulted in serious harm to these citizens."

The developer did not comment further.