China warned the United States on Thursday that it would take "firm counter measures" in response to US legislation backing anti-government protesters in Hong Kong, and said attempts to interfere in the Chinese-ruled city were doomed to fail.
Chinese Vice Foreign Minister Le Yucheng summoned US Ambassador Terry Branstad and demanded that Washington immediately stop interfering in China's domestic affairs.
Protesters in Hong Kong responded by staging a "Thanksgiving" rally, with thousands, some draped in US flags, gathering in the heart of the city.
US President Donald Trump on Wednesday signed into law congressional legislation which supported the protesters, despite angry objections from Beijing, with which he is seeking a deal to end a damaging trade war.
The US laws, which passed both chambers of Congress almost unanimously, mandate sanctions on Chinese and Hong Kong officials who carry out human rights abuses in Hong Kong, require an annual review of Hong Kong's favorable trade status and prohibit the export to Hong Kong police of certain nonlethal munitions.
Hong Kong, a former British colony that was granted semi-autonomy when China took control in 1997, has been rocked by six months of sometimes violent pro-democracy demonstrations.
"I signed these bills out of respect for President Xi, China, and the people of Hong Kong,'' Trump said in a statement. "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 Chinese foreign ministry said the United States would shoulder the consequences of China's countermeasures if it continued to "act arbitrarily" in regards to Hong Kong.
Foreign ministry spokesman Geng Shuang declined to comment on any countermeasures planned by Beijing.
"You better stay tuned, and follow up on this," he said. "What will come will come."
Trump's approval of the bills was not unexpected. Neither was the reaction from Beijing, given China's adamant rejections of any commentary on what it considers an internal issue.
Nevertheless, the clash comes at a sensitive time and could upset already thorny trade negotiations between the two nations.
Gao Feng, a spokesman for China's commerce ministry, did not comment directly on whether the law would affect trade talks, saying there were no new details of their progress to disclose.
Yucheng told US Ambassador Terry Branstad that the move constituted "serious interference in China's internal affairs and a serious violation of international law,'' a foreign ministry statement said.
Yucheng called it a "nakedly hegemonic act.'' He urged the US not to implement the bills to prevent greater damage to US-China relations, the ministry said.
In a statement about the meeting, the US Embassy in Beijing said, "the Chinese Communist Party must honor its promises to the Hong Kong people.''
The US "believes that Hong Kong's autonomy, its adherence to the rule of law, and its commitment to protecting civil liberties are key to preserving its special status under US law,'' it said.
While China has repeatedly threatened unspecified "countermeasures,'' it's unclear exactly how it will respond. Speaking on Fox News, Trump called the protests a "complicating factor'' in trade negotiations with Beijing.
Recently both sides expressed confidence they were making headway on a preliminary agreement to avert a further escalation in a tariff war that has hammered manufacturers in both nations.