The bill passed by the House of Representatives would give TikTok's parent company six months to divest or ban the app. It still faces an uphill battle in the Senate but President Joe Biden has said 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. US lawmakers have raised concerns about the app, saying it poses a national security risk to have Americans' data potentially in Chinese hands. TikTok's owners have denied these accusations. In a rare display of bipartisanship on Wednesday, the House overwhelmingly passed the bill, with 352 representatives voting in favor and 65 against. At a press conference in Beijing on Thursday, Chinese Foreign Ministry spokesman Wang Wenbin said the vote on the bill "goes against the principles of fair competition and justice." "When one person sees something good that another person has and tries to take it for himself, this is completely a bandit logic," Wang added.

Another Chinese official, commerce ministry spokesman He Yadong, said China "will take all necessary measures to protect its legitimate rights and interests."