China passed an antisanction law bill than expected. The legislation to counter foreign trade sanctions imposed by Western countries was voted into law Friday.

The law gives the government a legal basis to enact retaliatory measures against countries imposing punitive measures against China companies. The National People's Congress, of which all members are under U.S. sanctions for the passing of the national security law in Hong Kong, chose not to review the bill and voted to enact it immediately.

Individuals or entities involved in the implementation of "discriminatory" sanctions against China citizens or companies may be subject to restrictions.

If they are found to be involved they will be placed on an antisanction list to be administered by a yet-to-be-identified department. Those on the list can be denied entry or expelled.

The law gives the government authority to seize or freeze the assets of those on the list. The companies may also be restricted from doing business with China companies.

The law is China's latest legal tool for retaliation against Western nations and their sanctions - which have affected the businesses of big China companies.

This includes the U.S.'s recently expanded investment ban, which targeted China companies accused of having ties to the nation's military. The sanctions, which China described as "long-arm jurisdiction," targeted companies such as Huawei Technologies and ZTE.

China President Xi Jinping ordered the ruling Communist Party to find legal ways to defend the nation's sovereignty and interests against foreign sanctions. Earlier in the year, China's commerce ministry said it was exploring a legal mechanism that would allow companies and entities affected by foreign sanctions to sue for compensation in China.

A draft bill of the antisanction law had its first reading in April. The law was passed just two days after the NPC announced the bill was in the process of a second reading. The NPC decided to forgo a third reading.

Western governments are concerned about the accelerated passage of the law. Some say it will negatively affect foreign investment.

"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," the European Union Chamber of Commerce said in a statement.