China has condemned the United States for sailing a warship in the disputed South China Sea, accusing it of "undermining" peace and stability in the region.

A US Navy destroyer sailed within 12 nautical miles of an island claimed by China and other countries in the South China Sea to counter efforts to limit freedom of navigation, the Pentagon said on Saturday.

The US action "severely violated Chinese law, sabotaged the peace, security and good order of the waters, and undermined the region' s peace and stability," said Yang Yujun, China's Defence Ministry spokesman, according to Xinhua News Agency.

READ MORE: China warns US over provocative acts in South China Sea

China claims most of the South China Sea, a strategic waterway through which more than $5 trillion of world trade is shipped every year. Vietnam, Malaysia, Brunei, the Philippines and Taiwan have rival claims.

The US says it wants the crucial sea lane to be treated as international waters.

'Freedom of navigation'

Captain Jeff Davis, a Pentagon spokesman, said on Saturday that no ships from China's military were in the vicinity of the guided-missile destroyer USS Curtis Wilbur when it passed near Triton Island in the Paracel Islands.

"This operation challenged attempts by the three claimants - China, Taiwan and Vietnam - to restrict navigation rights and freedoms," Davis said.

Yet, China's defence ministry called the US action "intentionally provocative" and "extremely dangerous".

"The American warship has violated relevant Chinese laws by entering Chinese territorial waters without prior permission, and the Chinese side has taken relevant measures including monitoring and admonishments," China's foreign ministry said.

Davis said that the operation sought to challenge policies that require prior permission or notification of transit within territorial seas.

"No claimants were notified prior to the transit, which is consistent with our normal process and international law," he said.

In October, the US Navy conducted a similar exercise in which the guided-missile destroyer Lassen sailed close to one of China's man-made islands, also drawing a rebuke from Beijing.