US President Donald Trump has signed legislation into law effectively backing civil rights protesters in Hong Kong.
Beijing has reacted with fury, summoning the US ambassador Terry Branstad to demand that the United States immediately stop interfering in its internal affairs and stop causing further damage to bilateral relations.
The bill requires the US State Department to certify, at least annually, that Hong Kong retains enough autonomy to justify favourable US trading terms.
It also threatens sanctions for human rights violations.
A second bill banning the export of teargas, pepper spray, rubber bullets and stun guns to the Hong Kong police was also signed by Mr Trump.
In statement, he said: "I signed these bills out of respect for President Xi, China, and the people of Hong Kong. They are being enacted in the hope that leaders and representatives of China and Hong Kong will be able to amicably settle their differences leading to long term peace and prosperity for all."
The Hong Kong government has said it strongly opposes the US stance and regrets Mr Trump's backing for the legislation.
It said it would send the wrong signal to protesters and would not help ease the situation in Hong Kong.
But leading pro-democracy activists praised the position taken by the US.
Until he actually signed the bills, Mr Trump had been evasive about whether he would back them at a time of delicate trade negotiations with China.
But it appears his hand was forced by the overwhelming support for both pieces of legislation in the US Senate and House of Representatives.
Last week he claimed he had saved Hong Kong from being "obliterated in 14 minutes" by persuading Chinese leader Xi Jinping not to send in troops to crush the pro-democracy activists.
What started in March as a protest against a proposed extradition bill between the territory and China has grown into a battle for its identity, with demonstrators fighting to prevent what they regard as the erosion of the autonomy and democratic freedoms of Hong Kong.
Earlier this week pro-democracy candidates scored a huge victory in district council elections, which have left them in control of all but one of the local authorities that were up for grabs in Hong Kong.
In a briefing on Tuesday, US Secretary of State Mike Pompeo said: "The United State continues to support democratic values, fundamental freedoms in Hong Kong as guaranteed by the 'one country, two systems' framework, and aspirations of the Hong Kong people."