A statement from the Chinese side late on Wednesday said that vice foreign minister Zheng Zeguang had summoned US ambassador Terry Branstad to protest recent US moves including a law to sanction officials who undermine local autonomy in Hong Kong.

Mr Zheng said that threatened sanctions and the withdrawal of special trading privileges for Hong Kong are not about democracy and freedom in the semi-autonomous territory but an attempt to contain China’s development.

“I want to warn the US sternly that any bullying and unfairness imposed on China by the US will meet resolute counter attack from China and the US attempt to obstruct China’s development is doomed to failure,” he said, according to an account of Wednesday’s meeting carried by state media.

A statement posted on the US Embassy website on Thursday said Mr Branstad had met Mr Zheng the previous day to express deep American concern about Chinese decisions that erode fundamental freedoms in Hong Kong.

It said Mr Branstad explained the Trump administration’s conclusion that the city of 7.5 million people is no longer sufficiently autonomous from China to merit special treatment on trade, and called on China to restore Hong Kong’s liberties.

Mr Trump signed the Hong Kong Autonomy Act into law on Tuesday, as well as an executive order affirming an earlier decision to eliminate preferential treatment for Hong Kong.

The US and other Western democracies have grown increasingly concerned over developments in Hong Kong, and in particular China’s imposition of a national security law that is seen as a threat to freedom of speech and the right to protest.

At the same time, the Trump administration has challenged China on multiple fronts, treating it as a strategic competitor, an approach that seems only likely to expand as Mr Trump faces a tough battle for re-election this fall.

Chinese foreign minister Wang Yi said last week that US-China relations are facing their most severe challenge since the two countries established diplomatic ties in 1979, asking if bilateral relations will be able to stay the course after a more than four-decade voyage.

“Some in the US with ideological biases are resorting to all possible means to portray China as an adversary, and even an enemy,” he said, according to a text of his speech.

“They seek relentlessly to frustrate and contain China’s development.”

Mr Zheng told Mr Branstad that the US has also “interfered with China’s internal affairs and harmed China’s interests on the issues of Xinjiang, Tibet and the South China Sea, further exposing its nature of naked hegemony”.

He urged the US not to go “further and further on the wrong path”.

Mr Branstad called on China to refrain from any further erosion of the high degree of autonomy guaranteed Hong Kong by a Sino-British Joint Declaration signed before the British colony was returned to China in 1997.