Japan's parliament passed an economic security bill Wednesday aimed at guarding technology and reinforcing critical supply chains, while also imposing tighter oversight of Japanese firms working in sensitive sectors or critical infrastructure.

Measures in the legislation, which is primarily aimed at warding off risks from China, will be implemented over two years once it is enacted, according to the bill. It comes after the United States imposed restrictions on technology imports, such as on semiconductors, amid growing tension with Beijing.

The new law also arrives as Russia's invasion of Ukraine — Moscow calls its actions "a special operation" — adds pressure on Japan to do more to protect supply chains and infrastructure from hacking and cyberattacks, and ensure that technology critical to national security is not stolen.