The new law is China's latest and most wide-ranging legal tool to retaliate against foreign sanctions and is intended to give Chinese retaliatory measures more legitimacy and predictability, according to local experts.
Foreign companies, however, worry about the dampening impact it might have on foreign investment.
China's top legislature, the National People's Congress standing committee (NPC) passed the law on Thursday, according to state television CCTV. But details of its contents have not yet been released.
All 14 vice-chairpersons of the committee are under U.S. sanctions for passing the National Security Law last year that critics say has crippled political freedoms in Hong Kong. Beijing says it was needed to restore stability in the city.
President Xi Jinping called last November for the ruling Communist Party to use legal means to defend China's sovereignty, security and interests against foreign parties.
The NPC said in its annual work report in March that it wants to "upgrade our legal toolbox" to address the risks from foreign sanctions and interference.
In January, the commerce ministry announced mechanisms to assess if foreign restrictions on Chinese trade and business activities were justified, and for Chinese individuals or companies to sue for compensation in a Chinese court.
The United States and its allies have increasingly sanctioned Chinese officials to express concern about how China treats its Muslim Uyghur minority in Xinjiang and pro-democracy activities in Hong Kong, triggering counter-sanctions by China on U.S. and EU policitians and officials.
Washington has also targeted Chinese companies such as Huawei and ZTE for violating U.S. sanctions on Iran or North Korea, an act China called "long-arm jurisdiction".
The bill underwent a secret first reading in April, and was passed on Thursday, barely two days after NPC announced that it was doing a second reading of the bill. It skipped a third reading normally needed for other bills.
The European Union Chamber of Commerce said its members are alarmed at the lack of transparency about the passing of the bill.
"China seems to be in a hurry. Such action is not conducive to attracting foreign investment or reassuring companies that increasingly feel that they will be used as sacrificial pawns in a game of political chess," Joerg Wuttke, the Chamber's president, told Reuters.
Foreign companies looking to do business in China may find themselves up against increasing scrutiny from Chinese regulatory authorities in relation to their operations both locally and abroad, said Shaun Wu, from Paul Hastings, a law firm in Hong Kong
Chinese experts say Beijing is simply taking a page from the playbooks of the United States and European Union, which in recent years have passed various acts to serve as a legal basis for their engagement with China.
"China previously has neither the economic power nor the political will to use legal means to retaliate against U.S. sanctions. It now has both," said Wang Jiangyu, a law professor at City University of Hong Kong.
"Cooperation is the best option but the U.S. doesn't want it. So retaliation, such as with this new law, is the second best option. Sucking it up is the worst," he said.
(This story has not been edited by NDTV staff and is auto-generated from a syndicated feed.)
11 Years Prison: Chinese Football Hits New Low As Former Vice-President Sentenced For Accepting Bribes Viral Video: Man Enjoys Giant Bubble Tea Inside Bus, Internet Calls It "Bubble Sea" Philippine Vessel "Deliberately" Collided With Chinese Vessel: Beijing Indian Airports, Borders On Alert As Global Mpox Cases Rise: 10 Points "My Intention Was To...": Sudha Murty Clarifies Raksha Bandhan Post Flower Seller Forced To Buy iPhone For Son On Hunger Strike, Internet Reacts Mpox Death Count Crosses 570 As Congo Awaits Vaccines Delhi Nursing Student Found Dead In Locked Room, Cops Suspect Suicide "Hang Him Or Do...": Mother-In-Law Of Kolkata Rape-Murder Case Accused Track Latest News Live on NDTV.com and get news updates from India and around the world.