HONG KONG, Nov 28 — China warned the United States today 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.

US President Donald Trump yesterday 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.

Protesters in Hong Kong responded by staging a “Thanksgiving” rally, with thousands of people, some draped in US flags, gathering in the heart of the city.

“The rationale for us having this rally is to show our gratitude and thank the U.S Congress and also President Trump for passing the bill,” said 23-year-old Sunny Cheung, a member of the student group that lobbied for the legislation.

“We are really grateful about that and we really appreciate the effort made by Americans who support Hong Kong, who stand with Hong Kong, who do not choose to side with Beijing,” he said, urging other countries to pass similar legislation.

The law requires the State Department to certify, at least annually, that Hong Kong is autonomous enough to justify favourable US trading terms that have helped it become a world financial centre.

It also threatens sanctions for human rights violations.

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.

Chinese Vice Foreign Minister Le Yucheng summoned US Ambassador Terry Branstad and demanded that Washington immediately stop interfering in China’s domestic affairs.

Hong Kong’s Beijing-backed government said the legislation sent the wrong signal to demonstrators and “clearly interfered” with the city’s internal affairs.

China is considering barring the drafters of the legislation, whose US Senate sponsor is Florida Republican Marco Rubio, from entering mainland China as well as Hong Kong and Macau, Xu Xijin, the editor of China’s Global Times tabloid, said on Twitter.

‘Sinister intentions’

More than 5,800 people have been arrested since the unrest broke out in June over a proposal to allow extraditions to mainland China, the numbers increasing exponentially in October and November as violence escalated.

Demonstrators are angry at police violence and what they see as Chinese meddling in the freedoms promised to Hong Kong when it returned to Chinese rule in 1997, such as an independent judiciary.

China says it is committed to the “one country, two systems” formula put in place at the handover, and blames foreign forces for fomenting the unrest, which it did again in response to the US law.

“This so-called legislation will only strengthen the resolve of the Chinese people, including the Hong Kong people, and raise awareness of the sinister intentions and hegemonic nature of the US,” the foreign ministry said. “The US plot is doomed.”

Foreign ministry spokesman Geng Shuang, pressed on specifics of countermeasures planned by Beijing, declined to comment on a timeline or any measures.

“You better stay tuned, and follow up on this,” he told reporters today. “What will come will come.”

Gao Feng, a spokesman for China’s commerce ministry, did not comment directly on whether the Hong Kong law would affect trade talks, saying there were no new details of their progress to disclose.

Some analysts say any move to end Hong Kong’s special treatment could harm the United States, which has benefited from business-friendly conditions in the territory.

Lull in violence

Anti-government protests have roiled the former British colony for six months, at times forcing businesses, government, schools and even the international airport to close.

Hong Kong has enjoyed a rare lull in violence over the past week, with local elections on Sunday delivering a landslide victory to pro-democracy candidates.

Prominent activists Joshua Wong and Denise Ho addressed the rally on tonight, saying they had frontline protesters to thank for the passage of the bill. Crowds sang the protest anthem Glory to Hong Kong, waving their phone torches.

Several hundred people also gathered after nightfall outside the Polytechnic University, which police entered after a nearly two-week siege that saw some of the worst clashes between protesters and security forces.

“The situation in Poly U is still a disaster,” said 30-year-old Ng, dressed in black and wearing a surgical mask. “We are out to show we will never forget the Poly U incident.”

About 100 plainclothes police moved into the campus this morning to collect evidence and remove dangerous items such as petrol bombs. Police said any protesters found would receive medical treatment and arrests were not a priority, though they were seen brushing Molotov cocktails for fingerprints.

The university became a battleground in mid-November, when protesters barricaded themselves in and clashed with riot police in a hail of petrol bombs, water cannon and tear gas. About 1,100 people were arrested last week.

Reuters witnesses at the university said garbage and abandoned sleeping bags, helmets and gas masks were strewn everywhere, but no protesters could be seen. — Reuters