China said it would “firmly oppose” any forced sale of TikTok, in its first direct response to demands by the Biden administration that the app’s Chinese owners sell their share of the company or face a ban in its most important market. The comments came as TikTok CEO Shou Chew testified in front of US lawmakers amid mounting scrutiny over the app’s ties to Beijing. China’s commerce ministry said Thursday that a forced sale of TikTok would “seriously damage” global investors’ confidence in the United States. “If the news [about a forced sale] is true, China will firmly oppose it,” Shu Jueting, a spokeswoman for the ministry, told a Thursday news conference in Beijing, adding that any potential deal would need approval from the Chinese government. “The sale or divestiture of TikTok involves technology export, and administrative licensing procedures must be performed in accordance with Chinese laws and regulations,” she said. “The Chinese government will make a decision in accordance with the law.” Previously, Beijing didn’t weigh in directly on a potential forced sale. However, starting in 2020, it had signaled it wanted to protect Chinese technology by adding recommendation algorithms, which could include TikTok’s, to a list of technologies restricted for export. On Thursday, Chew, in his first congressional hearing, sought to provide nuanced answers and tried to assuage lawmakers’ worries about the company and its parent, Beijing-based Bytedance. But he was frequently interrupted and called evasive by lawmakers. After more than five hours of testimony, the lawmakers expressed deep skepticism about his company’s attempts to protect US user data and ease concerns about its ties to China. That means there will likely be more calls by Washington to ban TikTok if the company does not spin itself off from its Chinese parent, analysts said. The Chinese government may have veto power on the sale, according to Shu’s latest response and Beijing’s previous actions. In December, Chinese officials proposed tightening the rules that govern the sale of content-based recommendation algorithms to foreign buyers. TikTok’s algorithms, which keep users glued to the app, are believed to be key to its success. The algorithms give recommendations based on users’ behavior, thus pushing videos they actually like and want to watch. Chinese regulators first added algorithms to the restricted list of technologies in August 2020, when the Trump administration threatened to ban TikTok unless it was sold. Analysts and legal experts believe that Beijing may ultimately prefer for TikTok to leave the US market rather than surrender its algorithm.