BEIJING — China on Tuesday slammed as ‘‘groundless’’ a congressional report that called two Chinese telecom companies a threat to US security.

The report, released Monday by the House Intelligence Committee, warned that the US government and American companies should stop buying equipment from Huawei and ZTE — two of China’s largest telecom firms — because they are loyal to the Chinese government, had been used to steal intellectual property in the past, and could be used in the future as a tool for Chinese spying.

The allegations provoked strong public reactions by Chinese officials. ‘‘It is based on subjective speculation and false foundations,’’ Shen Danyang, a spokesman for China’s Commerce Department, said in a written statement. Shen also argued that the United States had violated its free-market principles and put at risk future cooperation between the United States and China.

Advertisement

Hong Lei, a spokesman for China’s foreign ministry, also defended both companies.

‘‘Chinese telecommunications companies have conducted their international operations based on market-economy principles,’’ Hong said. ‘‘Their investments in the US reflect the mutual benefits brought about by US-China trade relations.”