China has started to discuss legislation to retaliate for foreign sanctions, state-run media reported, as the country's tensions with the United States and other democratic nations have been intensifying over human rights and security issues.

At a four-day session of the Standing Committee of the National People's Congress that lasts through Thursday, Chinese lawmakers confirmed legal support is necessary to "counter discriminatory measures by a foreign country," the Xinhua News Agency said.

Recently, the Chinese Communist-led government has been at odds with democratic nations over its alleged human rights abuses against the Muslim Uyghur minority in Xinjiang and security challenges posed to Taiwan and its vicinity.

The European Union, along with the United States, Britain and Canada, imposed coordinated sanctions against the Asian country over the Xinjiang issue earlier this year.

The administration of former U.S. President Donald Trump also levied sanctions on China, including higher tariffs, over matters such as intellectual property infringement, security threats from state-of-the-art technology and the crackdown on Hong Kong.

Some nations have imposed sanctions "in accordance with their domestic laws, grossly interfering in China's internal affairs," the news agency said.

"The Chinese government has strongly condemned such hegemonistic acts" and implemented steps "to resolutely safeguard national sovereignty, dignity and core interests," Xinhua added.

The Global Times, a tabloid affiliated with the ruling Communist Party, said, "Some Western governments, out of political need and ideological prejudice, have been using Xinjiang-related topics and other excuses to spread rumors and suppress China."

The move "particularly violates international laws and basic norms of the international relationship," the newspaper said.

It added the so-called anti-foreign sanctions law is expected to be voted on by China's top legislative body soon.