Media playback is unsupported on your device Media caption In August, a BBC team flew over the disputed South China Sea islands in a US military plane

A Chinese warship has forced an American destroyer to change course in the South China Sea by sailing close to it in an "unsafe and unprofessional" manner, the US Navy says.

The USS Decatur was sailing past the Gaven and Johnson reefs in the disputed Spratly Islands, which China claims.

The Luyang destroyer "approached within 45 yards [41m] of Decatur's bow", Commander Nat Christensen said.

The US routinely angers Beijing with "freedom of navigation" missions.

The sea, home to vital shipping lanes, has in recent years become a flashpoint for tensions between China and several regional nations which have overlapping claims over islands and reefs.

Taiwan, the Philippines, Brunei, Malaysia and Vietnam all make claims to parts of the sea.

China, however, claims a huge area, known as the "nine-dash line", and routinely accuses the US Navy of provocation and interference in regional matters.

The USS Decatur travelled within 12 nautical miles of the Gaven and Johnson Reefs on Sunday. International law says states can claim territorial seas up to a limit of 12 nautical miles but the US sails within that distance to show that it does not recognise China's claims.

The Chinese manoeuvre almost caused a collision, US officials said.

"The US side repeatedly sends military ships without permission into seas close to South China Seas islands, seriously threatening China's sovereignty and security, seriously damaging Sino-US military ties and seriously harming regional peace and stability," China's defence ministry said.

Media playback is unsupported on your device Media caption WATCH: Malaysia PM's warning over South China Sea

The latest incident comes amid worsening trade tensions between Beijing and Washington, who have been imposing tit-for-tat tariffs on each other's goods.

The US also recently imposed sanctions on the Chinese military over its purchases of Russian military jets and surface-to-air missiles.

China has reportedly cancelled a security meeting later this month with US Defence Secretary Jim Mattis.

The South China Sea dispute