Image copyright IHS Jane's Image caption Satellite images of Fiery Cross Reef were published last year (CNES 2015, Distribution Airbus DS / Spot Image / IHS)

A US naval warship has sailed near a contested reef in the South China Sea, in what Washington described as a "freedom of navigation" operation.

The ship neared the disputed Fiery Cross Reef, which China controls, on Tuesday, US officials said.

China said the move was illegal and "damaged regional peace".

China and several of its neighbours are locked in a territorial dispute over the South China Sea, which Beijing claims almost in its entirety.

China, Taiwan, Vietnam, the Philippines, Malaysia and Brunei all have conflicting claims over reefs and islands in the sea.

China turned Fiery Cross Reef into an artificial island through a massive dredging operation, constructing buildings and an airstrip.

China says the structures are for civilian purposes. However, neighbouring countries are concerned at their possible military use.

Image caption China's so-called "nine dash line" (here as a solid blue line) is the basis of all its South China Sea claims

US Defense Department spokesman Bill Urban said Tuesday's naval operation was designed to "challenge excessive maritime claims of some claimants in the South China Sea".

The US, which officially takes no position on the territorial disputes, says its "freedom of navigation" patrols are to ensure access to key shipping and air routes.

However, Chinese Foreign Ministry spokesman Lu Kang said the US warship had "threatened China's sovereignty and security interests, endangered the staff and facilities on [Fiery Cross] Reef, and damaged regional peace and stability".

China had also conducted military drills near the disputed Spratly islands earlier this week, state media reported.

The latest tensions came as the Philippines, a US ally, elected Rodrigo Duterte as its next president.

Mr Duterte has given forthright opinions on the Philippines' territorial dispute with China in the South China Sea, saying he was ready to sail to the disputed Spratly islands to plant the Philippine flag there himself if talks did not work.

Contested South China Sea