BEIJING -- China is imposing restrictions on travel to Hong Kong by some U.S. officials and others in retaliation for similar measures imposed on Chinese individuals by Washington, the Foreign Ministry said Thursday.

U.S. diplomatic passport holders visiting Hong Kong and nearby Macao will temporarily no longer receive visa-free entry privileges, spokesperson Hua Chunying said.

U.S. administration officials, congressional staffers, employees of non-governmental organizations and their immediate family members will face "reciprocal sanctions," Hua said.

She was apparently referring to U.S. sanctions that bar certain Chinese and Hong Kong officials from travelling to the U.S. or having dealings with the U.S. financial system over their roles in imposing a sweeping National Security Law passed this summer that ushered in a crackdown on free speech and opposition political activity in Hong Kong.

Hua said the move was taken "given that the U.S. side is using the Hong Kong issue to seriously interfere in China's internal affairs and undermine China's core interests."

Those sanctioned "have performed egregiously and are primarily responsible on the Hong Kong issue," she said at a daily briefing.

"China once again urges the U.S. side to immediately stop meddling in Hong Kong affairs, stop interfering in China's internal affairs, and not go further down the wrong and dangerous path," Hua said.

China had long threatened to retaliate against the U.S. sanctions and other actions seen as hostile.

Earlier, China's official Xinhua News Agency said Trump administration officials are "digging a hole" for the next U.S. administration's relationship with China through actions targeting the country and its officials.

Steps such as restricting visas for the 92 million members of the ruling Communist Party and their families have "again exposed the sinister intentions of extreme anti-China forces in Washington to hijack China-U.S. relations for their own political gain," Xinhua said in an editorial.

The U.S. State Department last week cut the duration of such visas from 10 years to one month, another example of the increasingly hard-line stance adopted by the administration in its waning days. That came in addition to the sanctions targeting specific Chinese and Hong Kong officials over their actions in Hong Kong, the northwestern region of Xinjiang and elsewhere.

While President-elect Joe Biden has signalled he intends to keep pressure on China, he's also expected to seek a return to more conventional, less confrontational style of diplomacy. Rolling back Trump-era measures could be difficult however, while giving Republicans the chance to renew accusations that Biden is softening Washington's stance toward Beijing.

"By relentlessly challenging the bottom line of China-U.S. relations on issues concerning China's core interests, anti-China politicians are not only digging a hole for the next administration's relationship with China, but also eying their own personal political gains," Xinhua said.

U.S. Secretary of State Mike Pompeo has castigated China on almost a daily basis over its policies toward Taiwan, Tibet, Hong Kong, Xinjiang and the South China Sea.

Dozens of officials from mainland China and Hong Kong have been hit with visa bans and other sanctions and new restrictions have been imposed on Chinese diplomats, journalists and academics. Chinese tech giant Huawei has been shut out of the U.S. market and the U.S. has lobbied other countries to follow suit, often successfully.

On Wednesday, Pompeo accused U.S. universities of caving to Chinese pressure to blunt or bar criticism of the the Chinese communist party, which he said was "poisoning the well of our higher education for its own ends."

Chinese responded by vowing to impose countervailing measures against American officials, saying U.S. accusations and punitive measures only solidified the Chinese people behind their leaders.

Perhaps with an eye toward Biden, who takes office Jan. 20, Xinhua held open the possibility of better relations if Washington changed its approach.

"Today, China and the United States should also uphold the spirit of non-conflict, non-confrontation, mutual respect and win-win co-operation," Xinhua said. "The two must focus on managing their differences, with the top priority being a smooth transition toward stronger China-U.S. relations."