Apple has pulled a social and a news app from its online store in relation to anti-government protests in Hong Kong after receiving complaints from China.

The removed programmes include smartphone software that allows Hong Kong activists to track police and a US-based app that reports about the ongoing pro-democracy unrest which has lasted for four months.

The news came as the NBA, or the US National Basketball Association, faces mounting pressure from Beijing after one team manager showed support for the demonstrations and the league's boss backed employees' freedom of speech.

A protester wearing a Guy Fawkes mask uses her mobile phone during a demonstration in Hong Kong on Wednesday. Tech-savvy activists have been using software to organise rallies

Apple has removed apps deemed 'illegal' by China due to their relations to the anti-government unrest in Hong Kong that has been going on for four months. Pictured, activists march on a street as they take part in a rally in the city's Central district on October 4

The US tech giant said that one of the apps, HKmap.live, violated local law and Apple guidelines. Mainland China is Apple's second-biggest market after the United States

HKmap.live, a smartphone programme that allows Hong Kong activists to report police movements, was removed from Apple's App Store today after Beijing's mouthpiece newspaper accused the tech giant of 'facilitating illegal behaviour'.

State-run People's Daily said in an op-ed: 'Is Apple guiding Hong Kong thugs?'

Apple said in a statement that HKmap.live was removed because it 'has been used to target and ambush police' and 'threaten public safety.' It said that it violated local law and Apple guidelines.

HKmap.live allows users to report police locations, use of tear gas and other details that are added to a regularly updated map.

Another version is available for smartphones that use the Android operating system.

The programme also has a web-based version.

'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,' said the Apple statement.

'This app violates our guidelines and local laws, and we have removed it from the App Store.'

HKmap.live allows users to report police locations, use of tear gas and other details that are added to a regularly updated map. An Android version and a web version are still available

Supporters surround a police bus carrying political activist Edward Leung as it leaves the High Court in Hong Kong on Wednesday. Several hundred masked protesters chanting for revolution have gathered at Hong Kong's High Court for the appeal hearing of Leung

The news app of Quartz, a New York-based media organisation, was also taken down by Apple from its the Chinese version of its App Store after Beijing complained about its 'illegal content', according to The Verge.

The removal was due to the publication's coverage of the Hong Kong protests and VPNs, software that helps Chinese web users access websites banned in the country, the company claimed.

'We abhor this kind of government censorship of the internet, and have great coverage of how to get around such bans around the world,' Quartz CEO Zach Seward told The Verge.

The Hong Kong demonstrations began over a proposed extradition law and expanded to include other grievances and demands for greater democracy.

A display of the app 'HKmap.live' designed by an outside supplier and available on Apple's online store is seen in Hong Kong on Wednesday. The app has been taken down by Apple

Activists complain Beijing and Hong Kong leaders are eroding the autonomy and Western-style civil liberties promised to the former British colony when it returned to China in 1997.

Criticism of Apple followed government attacks starting last weekend on the NBA over a comment by Daryl Morey, the general manager of the Houston Rockets, in support of the protesters.

Morey, the Rockets and multiple NBA players have apologised to Beijing over the post, which read 'Fight For Freedom. Stand With Hong Kong'.

But Adam Silver, the NBA Commissioner, said he supported and would protect his employees' freedom of speech.

China's state TV has cancelled broadcasts of NBA games.

The NBA announced on Twitter-style Weibo that a pre-season game between the Los Angeles Lakers and Brooklyn Nets in Shanghai would take place as planned today.

'I did not intend my tweet to cause any offence to Rockets fans and friends of mine in China,' Houston Rockets general manager Daryl Morey (pictured) tweeted as he apologised to Beijing

Morey's initial tweet included an image captioned: 'Fight For Freedom. Stand With Hong Kong'

Adam Silver, Commissioner of the NBA, has shown his support for freedom of speech amid the controversy surrounding a post by Daryl Morey regarding the demonstrations in Hong Kong

People's Daily warned Apple might hurt its reputation with Chinese consumers.

'Apple needs to think deeply,' the newspaper said.

Another Chinese state newspaper Global Times this week issued a stern warning to global businesses, telling them to stay away from politics.

Global Times claimed it was 'ridiculous' to suggest that Mr Morey was entitled to free speech.

Westbrook, 30, has been highly praised in China after choosing to wear a Chinese-style tunic jacket in a press conference (right) after his debut show against the Toronto Raptors (left)

Brands targeted in the past by Beijing have been subjected to campaigns by the entirely state-controlled press to drive away consumers or disrupt investigations by tax authorities and other regulators.

China has long been critical to Apple's business.

The mainland is Apple's second-biggest market after the United States, but CEO Tim Cook says it eventually will become No. 1.

Apple, headquartered in Cupertino, California, also is an important asset for China.

Most of its iPhones and tablet computers are assembled in Chinese factories that employ hundreds of thousands of people. Chinese vendors supply components for Mac Pro computers that are assembled in Texas.