To operate a VPN service in the country, companies must now be authorised by the Chinese authorities.

In 2016 the United Nations passed a non-binding declaration that unrestricted access to the internet is a human right that must be protected.

The article states that the UN condemns measures that "intentionally prevent or disrupt access to or dissemination of information online" and that doing so is "in violation of international human rights law".

Countries including China, Russia, South Africa and Saudi Arabia opposed the resolution.

'Abide by the law'

Critics said Apple's decision to comply with the Chinese Government contradicts action taken by the company in the United States last year opposing a court order by the FBI.

US investigators wanted to break into an iPhone of a gunman who fatally shot 14 people in the Californian city of San Bernardino.

Mr Cook said that the situations were very different, and the laws in each country were clear.

"We have to abide by [the law] in both cases. That doesn't mean we don't state our point of view in the appropriate way, we always do that."

Willy Wo-Lap Lam from the Chinese University of Hong Kong said the move was a "commercial and political quid pro quo between Apple and the Chinese Government".

China is a key growth area for Apple, where revenues have stalled — falling for a fifth straight quarter — as sales grew in every other region.

The once coveted iPhone has slipped into fifth position behind offerings from local rivals Huawei, Oppo, Vivo and Xiaomi, analysts said.

"They don't want to be kept out of this lucrative market," Dr Lam said.

"After considering the potential damage to their business if they were to defy Chinese Government relations, I think they've decided to follow regulations, even though there are some critics who think that this is kowtowing to the ego of the Government."

Tightening cyber security

Apple — along with other US tech brands such as Facebook — have looked to cultivate a good relationship with China's leaders to achieve greater access and success within the market.

Apple is building a new data centre in the province of Guizhou to comply with a new cyber security law passed on June 1, which pushed firms to store user data inside China's borders.