BEIJING (Reuters) - A U.S. guided-missile destroyer sailed near disputed islands in the South China Sea in what China called a “provocation” as U.S. officials joined talks in Beijing during a truce in a bitter trade war.

The USS McCampbell carried out a “freedom of navigation” operation, sailing within 12 nautical miles of the Paracel Island chain, “to challenge excessive maritime claims”, Pacific Fleet spokeswoman Rachel McMarr said in an emailed statement.

The operation was not about any one country or to make a political statement, McMarr said.

The statement came as trade talks between China and the United States were under way in Beijing, the first round of face-to-face discussions since both sides agreed to a 90-day truce in a trade war that has roiled international markets.

Chinese Foreign Ministry spokesman Lu Kang said the conduct of the U.S. ship had violated China’s and international law, and China had lodged “stern representations”.

“We urge the United States to immediately cease this kind of provocation,” he said, adding that China had sent military ships and aircraft to identify and warn off the ship.

China’s defense ministry added that the ship had “gravely infringed upon China’s sovereignty”.

“We will be on high alert and will closely monitor the air and sea situation to strongly defend our sovereignty and security,” it said in comments carried by state media.

Asked about the timing of the operation during trade talks, Lu said resolving issues would help both countries and the world.

“Both sides have the responsibility to create the necessary positive atmosphere for this,” he said.

China claims almost all of the strategic South China Sea and frequently lambastes the United States and its allies over naval operations near Chinese-occupied islands.

Vietnam, the Philippines, Brunei, Malaysia, Indonesia and Taiwan have competing claims in the region.

U.S. President Donald Trump and Chinese President Xi Jinping in December agreed to put on hold a spiraling trade dispute of tit-for-tat import tariffs on hundreds of billions worth of goods.

FILE PHOTO: Chinese ships are seen during a search and rescue exercise near Qilian Yu subgroup in the Paracel Islands, which is known in China as Xisha Islands, South China Sea, July 14, 2016. REUTERS/Stringer

Trump has imposed tariffs to pressure Beijing to change its practices on issues ranging from corporate espionage to market access and industrial subsidies. China has retaliated with tariffs of its own.

Fears have grown in recent months that the dispute is just one vector in a bilateral relationship that is fast cooling across the board, with top administration officials sharply criticizing Beijing for everything from human rights abuses and its influence operations in the United States.

The two countries are also at odds over regional security, including Washington’s overtures to the self-ruled island of Taiwan, which Beijing claims as its own.

China and the United States have in the past repeatedly traded barbs over what Washington says is Beijing’s militarization of the South China Sea by building military installations on artificial islands and reefs.

China defends its construction as necessary for self-defense and says that it is rather Washington that is responsible for ratcheting up tensions in the region by sending warships and military plans close to islands Beijing claims.