Image copyright Reuters Image caption China has built extensively on Mischief Reef and installed military positions

A US warship has sailed close to an artificial island built by China in the South China Sea, the first challenge to Beijing's claim to the waters since President Donald Trump took office.

According to unnamed sources cited by US media, the USS Dewey passed within 12 nautical miles of Mischief Reef.

China said the US vessel had entered its waters "without permission" and its navy had warned it to leave.

The US insists it can conduct operations in any international waters.

It says it does not take sides in territorial disputes, but has sent military ships and planes near disputed islands in the past, calling them "freedom of navigation" operations to ensure access to key shipping and air routes.

It has also repeatedly criticised what it sees as Beijing's efforts to limit freedom of navigation in the strategic waters.

China claims almost all of the South China Sea, including reefs and islands also claimed by other nations.

Image copyright US Navy Image caption China said the USS Dewey (left) entered the area "without its permission"

Foreign ministry spokesman Lu Kang condemned the US move.

"The act damaged China's sovereignty and security interests, and could have easily led to an air or sea accident," he told reporters.

"[China] resolutely opposes any country sailing or flying freely that could pose damage to China's sovereignty and security interests. At present, through the joint efforts of China and Asean countries, the South China Sea situation has cooled down.

"The acts of the United States have seriously disrupted the process of dialogue and consultation."

What is Freedom of Navigation?

The US Freedom of Navigation programme challenges "excessive claims" to the world's oceans and airspace.

It was developed to promote international adherence to the UN Convention on the Law of the Sea.

In the past years, the US conducted Freedom of Navigation operations against China, Malaysia, the Philippines, Taiwan, and Vietnam.

China has been causing alarm in the region by building up South China Sea reefs and islets into artificial islands and installing some military positions.

Both the US and China have accused each other of "militarising" the South China Sea and there are concerns the area is becoming a flashpoint with potentially serious global consequences.

Last year, an international tribunal rejected China's claims to the area, in a case brought by the Philippines.

The Permanent Court of Arbitration said there was no evidence that China had historically exercised exclusive control over the waters or resources within its "nine-dash line".

China rejected the ruling as "ill-founded" and said it would not be bound by it.

The latest US manoeuvre is likely to weigh on US-China relations as the Trump administration is seeking Beijing's co-operation to deal with North Korea's nuclear ambitions.

Earlier this month, Chinese fighter jets intercepted a US aircraft which, according to US military officials, was on a mission to detect radiation in international airspace.

China did not comment on that particular incident - it has in the past accused the US of carrying out reconnaissance flights over Chinese coastal waters.

The South China Sea dispute

Media playback is unsupported on your device Media caption In 2015, the BBC got a view of a new Chinese runway on Mischief Reef

Sovereignty over two largely uninhabited island chains, the Paracels and the Spratlys, is disputed by China, Vietnam, the Philippines, Taiwan and Malaysia

China claims the largest portion of territory, saying its rights go back centuries - in 1947 it issued a map detailing its claims

The area is a major shipping route, and a rich fishing ground, and is thought to have abundant oil and gas reserves