China has passed a law aimed at countering foreign sanctions.

The Standing Committee of the National People’s Congress adopted the law on Thursday. The law states that China has the right to retaliate against hegemonism and discriminatory measures directed at the country’s citizens.

Foreign individuals placed on the government’s anti-sanctions list may be denied entry visas or expelled from the country. Their assets in China may be seized, and they could be banned from doing business in the country.

Entities on the list can be expelled from the nation and their assets can be seized. They can also be banned from doing business.

Foreign Ministry spokesperson Wang Wenbin said the law is necessary to safeguard the country’s sovereignty, national dignity and core interests. He also said it’s necessary to oppose Western hegemonism and power politics.

China has taken retaliatory measures against some of the Western nations that have imposed sanctions over issues in the Xinjiang Uygur Autonomous Region and Hong Kong.