Huawei: China attacks UK's 'groundless' ban of 5G kit
The Chinese government has said it is "strongly opposed" to the UK's "groundless" ban of Huawei's 5G kit.
Foreign Ministry spokeswoman Hua Chunying added Beijing would "take measures to safeguard" the "legitimate interests" of Chinese companies.
But President Trump welcomed the move.
"We convinced many countries, many countries - and I did this myself for the most part - not to use Huawei because we think it's an unsafe security risk," the US leader said.
Mr Trump made the comments as he attempted to increase pressure on Beijing by announcing an executive order ending preferential treatment for Hong Kong in response to a new security law brought in by China.
Huawei has repeatedly said it would not cause harm to any country.
The UK's digital secretary announced on Tuesday the country's telecoms networks would not be allowed to buy new Huawei 5G kit from 31 December and all such equipment should be stripped out of mobile networks by 2027.
In addition, it wants BT's Openreach and other broadband infrastructure providers to stop using Huawei's gear in the rollout of full-fibre broadband within the next couple of years.
China's ambassador to the UK said the decision was "not only disappointing, it's disheartening".
"The way you treat Huawei will be followed very closely by other Chinese businesses," Liu Xiaoming added.
But the foreign ministry arguably used even stronger language.
"The UK side has used groundless risks as an excuse to co-operate with the United States... violating the relevant commitments made by the UK," Ms Hua said.
"Any decisions and actions must come at a cost," she added, without being more specific.
Mr Huiyao Wang - an adviser to the Chinese government - told BBC Radio 4's Today programme Beijing still hoped the 2027 ban might be reversed before it came into effect.
But, as things stood, it could have an impact on other Chinese investment in Britain.
"It goes against the UK tradition as the open liberal leader in free trade," the founder of the Centre for China and Globalisation think tank said.
"This is going to probably have very negative implications."
The UK government said it had based its decision on the advice of security chiefs who had judged they could no longer mitigate the risks of using Huawei's equipment in light of new US sanctions.
The sanctions are designed to prevent the company having its own chips manufactured, making it buy in supplies from elsewhere.
And GCHQ's National Cyber Security Centre said this meant Huawei's equipment was likely to face more "security and reliability problems" as a consequence.