US President Donald Trump has ordered an end to Hong Kong's special status under US law to punish China for what he called "oppressive actions" against the financial hub.

Citing China's decision to enact a new national security law for Hong Kong, Mr Trump said he had signed an executive order that will end the preferential economic treatment Hong Kong has received for years.

"No special privileges, no special economic treatment and no export of sensitive technologies," he told a news conference.

He also signed a bill approved by the US Congress, the 'Hong Kong Autonomy Act', to penalise banks doing business with Chinese officials who implement the new security law.

"Today I signed legislation, and an executive order to hold China accountable for its aggressive actions against the people of Hong Kong," Mr Trump said.

"Hong Kong will now be treated the same as mainland China," he added.

Critics of the new Chinese security law fear it will crush the wide-ranging freedoms promised to Hong Kong when it returned to Chinese rule in 1997, while supporters say it will bring stability to the city after a year of sometimes violent anti-government protests.

The security law punishes what Beijing broadly defines as subversion, secession, terrorism and collusion with foreign forces with up to life in prison.

US relations with China have already been strained over the global coronavirus pandemic, China's military buildup in the South China Sea, its treatment of Uighur Muslims and massive trade surpluses.

The former British colony was returned to Chinese rule in 1997 with a law protecting freedoms of speech, assembly and the press until 2047.

The legislation Mr Trump signed calls for sanctions on Chinese officials and others who help violate Hong Kong's autonomy, and financial institutions that do business with those found to have participated in any crackdown on the city.

China has vowed to retaliate. Its foreign ministry said in a statement that the Hong Kong Autonomy Act "maliciously slanders" national security legislation imposed by Beijing on the city. 

"China will make necessary responses to protect its legitimate interests, and impose sanctions on relevant US personnel and entities. 

"Hong Kong affairs are purely China's internal affairs and no foreign country has the right to interfere," the ministry said.

New York Times moving some Hong Kong staff over security law

The New York Times said it was moving its digital news hub from Hong Kong to South Korea as a result of the national security law.

In an email to staff, Times executives said the new law "has created a lot of uncertainty about what the new rules will mean to our operation and our journalism".

"We feel it is prudent to make contingency plans and begin to diversify our editing staff around the region."

The newspaper has had a regional headquarters in Hong Kong for decades, overseeing Asia coverage and more recently helping to run the newspaper's 24-hour digital news operation alongside its two others hubs in London and New York.

In its own news report on the move, the Times said it would move its digital team, roughly one-third of its Hong Kong employees, to Seoul over the next year.

The Times report said it had recently "faced challenges securing work permits" for its staff in Hong Kong, something it said was "commonplace in China but were rarely an issue in the former colony".

Earlier this year China expelled several journalists working for US news organisations, including the Times, in a tit-for-tat spat with Washington.

Some of the expelled Times journalists have already relocated to Seoul.

Alongside the New York Times, media organisations that have major regional hubs in Hong Kong include AFP, CNN, the Wall Street Journal, Bloomberg and the Financial Times.