By Bernd Debusmann Jr, BBC News, Washington
China has attacked a bill going through Congress that could ultimately see TikTok banned in the US, accusing it of "unjustly" behaving like a "bandit".
The bill passed by the House of Representatives would give TikTok's parent company six months to divest from the firm or face a ban on the app.
It still faces an uphill battle in the Senate but President Joe Biden says he will sign it if it passes Congress.
Beijing has vowed to take" necessary measures" to protect its interests.
TikTok is owned by Chinese company ByteDance, a Beijing-based firm registered in the Cayman Islands,
US lawmakers have expressed concern about the app, saying the data of Americans potentially in Chinese hands makes it a national security risk. TikTok's owners have rejected those accusations.
In a rare show of bipartisanship on Wednesday, the House voted overwhelmingly to pass the bill, with 352 representatives voting in favour of the proposed law and 65 against.
At a news conference in Beijing on Thursday, Chinese foreign ministry spokesman Wang Wenbin said the vote on the bill "runs contrary to the principles of fair competition and justice".
"When someone sees a good thing another person has and tries to take it for themselves, this is entirely the logic of a bandit," Wang added.
Another Chinese official, commerce ministry spokesperson He Yadong, said that China would "take all necessary measures to safeguard its legitimate rights and interests".
Meanwhile, former Treasury Secretary Steven Mnuchin said on Thursday that he was putting together a team of investors to make a bid to buy TikTok. "It's a great business," he told CNBC.
Whether he gets the chance will depend on the bill passing Congress and it is unclear whether it has enough support in the Senate.
Republican Donald Trump has said he is now opposed, having previously backed a ban.
After its passage in the House, TikTok chief executive Shou Zi Chew said that the bill would take "billions of dollars out of the pockets of creators and small businesses".
"It will also put more than 300,000 American jobs at risk and it will take away your TikTok," Chew said in a video posted on TikTok and on X, formerly known as Twitter.
On Wednesday, several TikTok "creators" told the BBC they feared for their livelihood and businesses if the bill becomes a law.
"I buy items from small businesses and showcase them on my platform - I enhance them," said Ophelia Nichols, an Alabama-based creator with more than 12m followers on the platform. "It's the small businesses that will suffer...you have to worry about that."
TikTok's Chew also urged its users to speak out against the vote and contact their lawmakers - an effort that has already seen the offices of some members of Congress inundated with calls from angry constituents.
The approach is one that has irked US lawmakers. One of the bill's co-sponsors, Texas Republican Chip Roy, told the BBC in an interview that he believes TikTok "shot itself in the foot" with the lobbying effort.
"[That is] demonstrating that they want to use the power of their technology to persuade people and inform them through their viewpoint," he said, adding that the effort amounted to "the propaganda angle that we're seeing out of TikTok."
TikTok is banned in China along with other social media platforms.
Instead, Chinese users use a similar app, Douyin, which is only available in China and subject to monitoring and censorship by the government.
- This story was first published by the BBC