China said on Friday it was "strongly dissatisfied" after a U.S. spy plane flew over part of the South China Sea this week near where China is building artificial islands, and called on the United States to stop such action or risk causing an accident.

The U.S. flight on Wednesday was highlighted by the unusual Pentagon decision to invite a CNN team aboard the Poseidon surveillance plane. It said the Chinese navy issued eight warnings to the aircraft to move away from the contested territory.

Chinese Foreign Ministry spokesman Hong Lei said the Chinese military drove away the aircraft, in accordance with relevant regulations. He labelled the U.S. action a security threat to China's islands and reefs.