TikTok will no longer work in Hong Kong, its makers have said, after the new security law was imposed in the territory by China.

The legislation has sparked fears for freedom of expression, and internet giants Google, Facebook and Twitter have put a hold on government requests for user data from Hong Kong authorities since it came into force.

"In light of recent events, we've decided to stop operations of the TikTok app in Hong Kong," the Chinese-owned firm said, becoming the first major social media platform to exit the city since the law was imposed last week.

The company expects to wind down operations in Hong Kong in a matter of days.

TikTok, owned by China's ByteDance, had already been in the spotlight over how it collects and uses data, but has repeatedly denied sharing any user information with Chinese authorities.

Beijing said it imposed the new law on semi-autonomous Hong Kong to end the sometimes violent pro-democracy protests that have shaken the city since over a year ago.

It grants the police powers to control and remove online information if there are "reasonable grounds" to suspect the data breaches the national security law - reminiscent of internet controls in mainland China.

Internet firms and service providers can be ordered to remove information, and their equipment can be seized.

Companies are also expected to provide identification records and decryption assistance.

Despite concerns about how it collects and shares data, TikTok has become a global sensation with users - especially young people - sharing 15 to 60-second video clips on everything from hair dye tutorials to dance routines and gags about daily life.

While it does not publish such data, TikTok is estimated to have close to one billion users worldwide.

But it has also found itself involved in major diplomatic disputes.

India banned TikTok over national security concerns following a deadly border clash between its soldiers and Chinese forces.

Despite its ownership, TikTok is not available in mainland China, where ByteDance offers a variant called Douyin.

US 'looking at' banning TikTok and other Chinese apps

US Secretary of State Mike Pompeo has said the United States is looking at banning Chinese social media apps, including TikTok, over allegations that they are being used to spy on users.

Asked on Fox News if the US should consider blocking the apps - "especially TikTok" - the country's top diplomat said the Trump administration was "taking this very seriously; we are certainly looking at it."

Mr Pompeo said the US had been working for a "long time" on the "problems" of Chinese technology in infrastructure and was "making real progress."

"With respect to Chinese apps on people's cell phones, I can assure you the United States will get this one right too," he said.

"I don't want to get out in front of the president, but it's something we are looking at."

Mr Pompeo earlier hit out at what he called China's "Orwellian" moves to censor activists, schools and libraries in Hong Kong under the new security law.

Authorities in the financial hub have ordered schools to remove books for review under the law, which has criminalised certain opinions such as calls for independence or more autonomy.

Libraries in Hong Kong said they were pulling titles written by a handful of pro-democracy activists.

"The Chinese Communist Party's destruction of free Hong Kong continues," Mr Pompeo said in a sharply worded statement.

"With the ink barely dry on the repressive National Security Law, local authorities - in an Orwellian move - have now established a central government national security office, started removing books critical of the CCP from library shelves, banned political slogans, and are now requiring schools to enforce censorship," he said.

Mr Pompeo condemned what he called the "latest assaults on the rights and freedoms of the people of Hong Kong".

"Until now, Hong Kong flourished because it allowed free thinking and free speech, under an independent rule of law. No more," he said.

Mr Pompeo made similar comments on Twitter.

US Vice President Mike Pence told CNBC last week that the law was a "betrayal" and "unacceptable to freedom-loving people around the world".

Last week the US Congress passed tough new sanctions targeting banks involved in violating Hong Kong's autonomy.

The act would punish banks - including by blocking loans from US institutions - if they conduct "significant transactions" with officials who violate the city's autonomy.

President Donald Trump must sign the legislation for it to take effect.

Read more: What are Hong Kong police's new powers?