(CNN) A maritime dispute in the South China Sea flared up on Thursday when a US destroyer sailed near man-made island claimed by China, a move Beijing labeled a "provocation" and the United States called appropriate under international law.

The USS John S. McCain sailed near Mischief Reef in a "freedom of navigation" operation. The reef is an artificial island built by China in the Spratly Islands, known by China as the Nansha Islands.

The operation occurred at an awkward and tense moment in the region, amid the war of words between the United States and North Korea.

China, one of Pyongyang's closest diplomatic partners, has been working to ease tensions , but President Trump has often urged China to do more touse its influence to help address the dispute over North Korea's nuclear program.

The dispute over the McCain revolves around China's claim of sovereignty to the Spratlys, one of many quarrels in the contentious region.

The United States does not recognize China's claim of sovereignty in that location and regards the area as international waters. The operation on Thursday punctuated that stance.

Mischief Reef in the South China Sea in January 2012, left, and in September 2015, right following Chinese land reclamation.

Shadowed by Chinese frigates

A US defense official said the plan was for the destroyer to sail within 6 nautical miles of Mischief Reef, one of the artificial islands built by China in the Spratlys. A military official said the ship performed a drill and confirmed two Chinese frigates shadowed the McCain near Mischief Reef, with the ships never getting closer than 1,000 yards.

In July, a US Navy destroyer sailed within 12 miles of another disputed island in the South China Sea claimed by China, also a "freedom of navigation exercise." That occurred around Triton Island in the Paracel archipelago, which is claimed by China, Vietnam and Taiwan.

Beijing upbraided the United States for the Thursday's operation -- the third reported under the Trump administration.

"China holds indisputable sovereignty over Nansha Islands and surrounding waters," the Chinese Defense Ministry said early Friday. "The Chinese military is firmly opposed to such flaunting of force and promotion of militarization in the region by the US, which could easily trigger accidents at sea and in the air."

Chinese navy guided missile frigates "took immediate action to identify and verify the US ship, and warned and dispelled it," the Defense Ministry said. The Chinese Foreign Ministry issued a similar statement.

Beijing said that a "joint effort" by China and other countries to address the territorial disputes has yielded "signs of positive developments." It added that US moves "to pick quarrels and make troubles under the banner of 'freedom of navigation'" endangered lives and harmed regional stability.

Pressure point?

On Thursday, State Department spokeswoman Heather Nauert was asked at a briefing whether "freedom of navigation" and other issues serve to "make for a more difficult campaign on North Korea with China."

Such operations, Nauert said, get the "most attention" when they occur in the South China Sea.

"They happen off the coast of Canada" and "in the waters off shore of our major allies, friends, partners all around the world," she said.

"As you all know, US forces will operate in the Asia-Pacific region. They do that on a daily basis, including the South China Sea. The operations are conducted in accordance with international law," she said.

"And the point of that is to demonstrate that the United States will continue to fly, sail and operate wherever international law allows. It's true in the South China Sea. It's true in other places around the world, as well," she added.

The Spratly Islands

The United States, Australia and Japan have promised to continue "freedom of navigation" operations in the South China Sea and called on Beijing to endorse a legally binding code of conduct over the disputed region.

In a joint statement after a meeting Monday of US Secretary of State Rex Tillerson and his Australian and Japanese counterparts, the three officials "expressed serious concerns over maritime disputes in the South China Sea."

The South China Sea is filled with small islands, reefs and shoals and there are many territorial disputes between countries in the area.

China's "nine-dash line" -- its claimed territorial waters that extend hundreds of miles to the south and east of its island province of Hainan -- abut its neighbors' claims and, in some cases, encroach upon them.

Beijing has reclaimed land in massive dredging operations, turning sandbars into islands equipped with airfields, ports and lighthouses.

The Spratlys, which consist of more than 100 small islands or reefs, are about 600 miles from the Chinese coast and the CIA World Factbook says they are surrounded by rich fishing grounds -- and potentially by gas and oil deposits

The archipelago is claimed in its entirety by China, Taiwan and Vietnam, while portions are claimed by Malaysia and the Philippines.

"About 45 islands are occupied by relatively small numbers of military forces from China, Malaysia, the Philippines, Taiwan and Vietnam. Since 1985 Brunei has claimed a continental shelf that overlaps a southern reef but has not made any formal claim to the reef. Brunei claims an exclusive economic zone over this area," the CIA Factbook says.