BEIJING -- The mouthpiece of China’s ruling Communist Party said U.S. moves to end some trading privileges for Hong Kong “grossly interfere” in China’s internal affairs and are “doomed to fail.”

Saturday's editorial in the newspaper People’s Daily was responding to an announcement from President Donald Trump, after China’s ceremonial parliament bypassed Hong Kong’s local legislature to advance legislation that could severely curtail free speech and opposition political activities in the semi-autonomous Chinese territory.

It was the “firm determination of all Chinese people” to oppose interference in Hong Kong affairs by any external forces, the paper said.

“This hegemonic act of attempting to interfere in Hong Kong affairs and grossly interfere in China’s internal affairs will not frighten the Chinese people and is doomed to fail," it said. Attempts at “forcing China to make concessions on core interests including sovereignty and security through blackmailing or coercion ... can only be wishful thinking and day-dreaming!"

China has threatened to retaliate over the U.S. move to cancel trading advantages granted to Hong Kong after its handover from British to Chinese rule in 1997.

Tensions over Hong Kong have increased over the past year as China has cracked down on protesters and strengthened its control over the Asian financial hub.

Critics say the vote Thursday at the National People's Congress to impose security legislation on Hong Kong effectively negates Beijing's pledge to maintain the territory's separate civil, legal and economic institutions under the “one country, two systems" framework.

Trump said the administration would begin eliminating the “full range” of agreements that had given Hong Kong a relationship with the U.S. that mainland China lacked, including exemptions from controls on certain exports. “China has replaced its promised formula of one country, two systems, with one country, one system,” he said.

Secretary of State Mike Pompeo notified Congress on Wednesday that Hong Kong is no longer deserving of the preferential trade and commercial status it has enjoyed from the U.S.

It’s not yet clear what impact the decision will have on U.S. companies that operate in Hong Kong, or on the city’s position as Asia’s major financial hub. Beijing has yet to give details on what specific measures it will take in response, although the People's Daily editorial said China was prepared to make a “resolute counterattack and what awaits you can only be a shameful failure.”

In Hong Kong on Saturday, Secretary for Justice Teresa Cheng said it was “completely false and wrong” to say the territory was losing its autonomy.

China’s central authorities have the absolute right to take action on national security regarding Hong Kong, Cheng told reporters.

She also criticized the U.S., saying "any other state that tries to use coercion or whatever means with a view to interfering with the sovereign right of a state to pass its own national security law is arguably infringing on the principle of non-intervention under public international law, and that is not acceptable.”

China passed the Hong Kong national security law after stiff public opposition scuppered a previous attempt by the territory’s legislature to pass such legislation in 2003.

Beijing’s resolve appeared to have been hardened by months of anti-government protests in Hong Kong that frequently led to violent confrontations between police and the largely youthful demonstrators. China repeatedly accused foreign governments and international organizations of fueling the demonstrations, while showing no direct evidence.

Speculation over Washington’s response has included the possibility that those connected with the crackdown, including members of the Hong Kong police force, could face U.S. travel bans or other sanctions.

“It is now clear that Hong Kong is caught in the middle of major China-U.S. tensions," said Tara Joseph, president of the American Chamber of Commerce in Hong Kong.

Businesses face multiple unanswered questions about the unraveling of the special trading relationship and it “won’t be like flipping a switch," Joseph said.___

Associated Press writer Zen Soo in Hong Kong contributed to this report.