BEIJING • China's military has announced that it had dispatched warships to challenge two US Navy vessels that sailed through waters in the South China Sea that China claims as its own.

The Chinese confronted the US ships and warned them to leave, the defence ministry said in a statement posted on its website on Sunday, but other details of the encounter were not immediately clear.

The US vessels - the Higgins, a destroyer, and the Antietam, a cruiser - passed within 12 nautical miles of the Paracel islands, an archipelago in the northern part of the disputed waters of the South China Sea off the coast of Vietnam.

The military vessels carried out manoeuvring operations near Tree, Lincoln, Triton and Woody islands in the Paracels, a US official said on condition of anonymity.

The chief spokesman for China's defence ministry, Senior Colonel Wu Qian, said that the US "gravely violated Chinese sovereignty".

The foreign ministry issued a statement expressing "strong dissatisfaction" and "resolute opposition" to the US sail-by. State-run news agency Xinhua said the two vessels were "expelled" from the waters.

The high-seas confrontation, while not unprecedented, came as tensions have been rising between the United States and China on a number of fronts, from trade to the on-again-off-again talks with North Korea over its nuclear programme.

In recent months, China has appeared more determined to defend its claims in the South China Sea, reinforcing and arming its bases in the Paracel islands and farther south in the Spratly islands, even though the various islands, reefs, shoals and other outcroppings are also claimed by Vietnam, the Philippines, Taiwan and others.

The US operation on Sunday was the latest attempt to counter what Washington sees as Beijing's efforts to limit freedom of navigation in the strategic waters.

While this operation had been planned months in advance, and similar operations have become routine, it comes at a particularly sensitive time and just days after the Pentagon uninvited China from a major US-hosted multinational naval drill.

The disinvitation was made in retaliation for China's deployment of its H-6K strategic bomber on Woody island on May 18.

Earlier in the month, the US also formally protested against the deployment of missiles and radar equipment on three artificial islands China has built in the Spratly islands.

US officials accused Beijing of breaking a promise Chinese President Xi Jinping made in 2015 when he said China did not intend to militarise the disputed territories.

China argues that passage within 12 nautical miles constitutes a violation of the country's territory under the UN Convention on the Law of the Sea.

The US military did not directly comment on Sunday's operation, but said US forces operate in the region daily.

"We conduct routine and regular Freedom of Navigation operations, as we have done in the past and will continue to do in the future," the US Pacific Fleet said in a statement.

Critics of the US naval operations have said that they have little impact on Chinese behaviour and are largely symbolic.

NYTIMES, REUTERS, AGENCE FRANCE-PRESSE