Shanghai – A US Navy destroyer sailed near a disputed shoal claimed by China in the South China Sea this week, US officials said on Saturday, and Beijing vowed to take “necessary measures” to protect its sovereignty.

China’s foreign ministry said USS Hopper missile destroyer came within 12 nautical miles of Huangyan Island, which is also known as Scarborough Shoal and subject to a rival claim by the Philippines.

It was the latest US naval operation challenging extensive Chinese claims in the South China Sea and came even as US President Donald Trump’s administration seeks Chinese cooperation in dealing with North Korea’s missile and nuclear programs.

Two US officials confirmed that the USS Hopper had sailed within 12 nautical miles of Scarborough Shoal.

The officials, who spoke on condition of anonymity, said the patrol was in line with international law and was an “innocent passage,” in which a warship effectively recognizes a territorial sea by crossing it quickly, without stopping.

Twelve nautical miles is an internationally recognized territorial limit.

The US military says it carries out “freedom of navigation” operations throughout the world, including in areas claimed by allies, and that they are separate from political considerations.

The Pentagon did not directly comment on the latest patrol but said such operations are routine.

“All operations are conducted in accordance with international law and demonstrate that the United States will fly, sail and operate wherever international law allows,” Pentagon spokesman Lieutenant Colonel Christopher Logan said.

The US military put countering China and Russia at the center of a new national defense strategy unveiled on Friday. China criticized the strategy, saying Beijing sought “global partnership, not global dominance.”

Chinese foreign ministry spokesman Lu Kang said the USS Hopper violated China’s sovereignty and security interests and threatened the safety of Chinese vessels and personnel.

Lu said the Chinese navy ordered the vessel to withdraw after determining its identity.

The United States has criticized China for constructing islands and military installations in the South China Sea, saying they could be used to restrict free movement in a critical global trade route.

Lu said China “firmly opposes” efforts to use freedom of navigation as an excuse to hurt its sovereignty and urged the United States to “correct its mistakes.”

China’s defense ministry said the repeated dispatch of US warships to the region was “undermining regional peace and stability” and hurting bilateral relations.

Greg Poling, a South China Sea expert at Washington’s Center for Strategic and International Studies think tank, said the Pentagon appeared determined to keep up regular freedom of navigation patrols in the sea, with one every six weeks or so, in spite of Chinese objections.

“The last made public was in October, but we should expect that there was at least one other in the interim,” he said. “The only time word is getting out these days is if Beijing makes an issue of it.”