(Bloomberg) -- China’s passed a controversial law that gives the coast guard more freedom to fire on foreign vessels, a move that could fuel the risk of military miscalculation in the Western Pacific.

The law is aimed at “safeguarding national sovereignty, security and maritime rights,” the official Xinhua News Agency said in a report early Saturday. The law will take effect from Feb. 1.

The China Coast Guard would be allowed to take “all necessary means,” including the use of weapons, to stop or prevent threats from foreign vessels, according to the text released by Xinhua. Coast guard personnel will be permitted to board and inspect foreign ships operating in China’s “jurisdictional waters,” a term covering areas claimed by other countries.

The move could raise the risk of miscalculation in the vast areas of disputed waters that stretch out from China’s coast. Chinese coast guard ships often come into close contact -- sometimes engaging in tense standoffs -- with foreign vessels, as they assert Beijing’s claims to much of the South and East China seas.

Chinese Foreign Ministry spokeswoman Hua Chunying told a regular briefing Friday in Beijing that the move was a “normal legislative activity of the NPC” and that China “will remain committed to upholding peace and stability in the sea.”

Claims to the resource-rich waters of the South China Sea have put China at odds with Southeast Asia neighbors including Malaysia, the Philippines and Vietnam. In East China Sea, Chinese and Japanese government vessels routinely tail each other on patrols near uninhabited islands claimed by both sides.

Earlier this week, Japanese diplomats in a conference call with Chinese counterparts expressed strong opposition to repeated incursions the country’s vessels near the disputed Senkaku Islands, which are known as the Diaoyus in China. The Chinese delegates urged the two sides to work to make the area a “sea of peace, cooperation and friendship,” the Ministry of Foreign Affairs in Beijing said.

The law is China’s latest step to empower its coast guard, which was created in 2013 by merging several maritime agencies and incorporated in the People’s Armed Police in 2018. The fleet has increased its presence in disputed waters recently, including a stand-off with Vietnam in the South China Sea’s Vanguard Bank in 2019.

The move could also prompt other nations to bolster their military presence in the waters, including the U.S. Then-National Security Adviser Robert O’Brien said last year that the U.S. Coast Guard was looking to expand its presence in the Pacific.

©2021 Bloomberg L.P.