China on Saturday accused the U.S. of trespassing in its waters when a U.S. guided missile destroyer sailed near the disputed Scarborough Shoal in the South China Sea.

Chinese Foreign Ministry spokesman Lu Kang said China would take “necessary measures” to protect its sovereignty after the U.S. Navy’s USS Hopper sailed within 12 nautical miles of Huangyan Island, also known as Scarborough Shoal on Wednesday night.

According to China's Defense Ministry, a Chinese frigate "immediately took actions to identify and verify the U.S. ship and drove it away by warning."

Defense Ministry spokesman Wu Qian also said that the Chinese government hopes that "the U.S. respects China’s sovereignty, respects the efforts by regional countries, and do not make trouble out of nothing.”

The South China Sea serves as a critical shipping route that is claimed almost entirely by China. An estimated one-third of global shipping goes through the South China Sea, and it is also known to have rich fishing grounds and potential oil and gas reserves.

The Chinese government has also carried out land reclamation projects on many of the reefs and islands, even keeping military facilities on some of the disputed islands.

In November, Trump said he would mediate between claimants of the South China Sea.

In addition to China, Vietnam, Brunei, Malaysia, the Philippines, and Taiwan also have claims in the sea.