China passed a law to counter foreign sanctions on Thursday, responding to growing pressure from the United States and the European Union on trade and human rights.
Beijing has accused the US of "cracking down" on Chinese companies and threatened retaliation after US President Joe Biden last week expanded a blacklist of foreign companies in which Americans are barred from investing in the name of national security.
The countermeasures in the Chinese law include "denial of visas, entry or expulsion... and sealing up, seizing and freezing assets of persons or enterprises that adhere to foreign sanctions against Chinese enterprises or officials," according to the text issued by the Standing Committee of the National People's Congress, China's top legislative body.
The restrictions may also apply to family members of people in trouble with Beijing.
Beijing has long complained about the extra-territorial application of US law through sanctions and trade restrictions.
In recent months, Biden has stepped up US criticism of China, both over intellectual property theft and alleged human rights abuses in Hong Kong and against Muslim minorities in Xinjiang.
The blacklist expanded by the White House last week includes 59 Chinese companies accused of supporting Beijing's military activities, up from 31.
They include the major telecoms company China Mobile, the video surveillance company Hikvision and the Chinese oil company CNOOC.
China's Anti-Foreign Sanctions Law also allows the country's courts to punish companies for complying with foreign laws that infringe on national interests, thus putting multinationals that comply with US sanctions at risk.
In addition, the law states that companies or individuals in China do not need to comply with foreign restrictions.