Shanghai (Reuters): A US Navy destroyer this week sailed near the Scarborough Shoal, a disputed lagoon claimed by China in the South China Sea, US officials said on Saturday, and Beijing vowed to take “necessary measures” to protect what it said was its sovereignty.

China’s foreign ministry said USS Hopper missile destroyer came within 12 nautical miles off Huangyan island, better known as the Scarborough Shoal and subject to a rival claim by the Philippines, a historic ally of the United States.

It was the latest U.S. 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, a rocky outcrop and prime fishing spot due to its bountiful catches and calm waters.

With a permanent presence of large coastguard vessels, China blockaded the Scarborough Shoal for more than four years but ended that in October 2016 at the request of Philippine President Rodrigo Duterte, who said Filipino fishermen were suffering.

The US 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.

Though located within the Philippines’ 200 nautical mile Exclusive Economic Zone, an international tribunal in 2016 ruled that the Scarborough Shoal is a traditional fishing ground that no one country has sole rights to exploit.

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 U.S. warships to the region was “undermining regional peace and stability” and hurting bilateral relations