BEIJING (Reuters) - China expressed anger on Tuesday after a U.S. Navy destroyer sailed near islands claimed by China in the disputed South China Sea, saying it resolutely opposed an operation that it called a threat to its sovereignty.

Beijing and Washington are locked in a trade war in which they have imposed increasingly severe rounds of tariffs on each other’s imports.

A U.S. official, speaking on condition of anonymity, said the destroyer the USS Decatur traveled within 12 nautical miles of Gaven and Johnson Reefs in the Spratly Islands on Sunday.

The operation was the latest attempt to counter what Washington sees as Beijing’s efforts to limit freedom of navigation in the strategic waters, where Chinese, Japanese and some Southeast Asian navies operate.

China’s Defence Ministry said a Chinese naval ship had been sent to warn the U.S. vessel to leave.

The ministry said China has irrefutable sovereignty over the South China Sea islands and the waters around them, and the situation there is progressing well thanks to the hard work of China and countries in Southeast Asia.

“The U.S. side repeatedly sends military ships without permission into seas close to South China Seas islands, seriously threatening China’s sovereignty and security, seriously damaging Sino-U.S. military ties and seriously harming regional peace and stability,” the ministry said.

“China’s military is resolutely opposed to this,” it said.

The Chinese armed forces will continue to take all necessary steps to protect the country’s sovereignty and security, the ministry said.

China’s Foreign Ministry said in a separate statement it strongly urged the United States to stop such “provocative” actions and to “immediately correct its mistakes”.

The operation also comes as military ties between the two countries have dived, with China also angered by U.S. sanctions on China’s military for buying Russian arms and by U.S. support for self-ruled Taiwan, which Beijing claims as its own.

U.S. Defense Secretary Jim Mattis said on Monday he did not see relations between the United States and China worsening, a day after his trip to China was canceled.

Reuters reported on Sunday that China canceled a security meeting with Mattis that had been planned for October. A U.S. official, speaking on the condition of anonymity, said Mattis was no longer going to China.

China has not yet commented on the matter.

Chinese Defence Minister Wei Fenghe is due to visit the United States later this year but China’s Defence Ministry suggested last week that may not happen.