A U.S. navy warship sailed close to a disputed reef in the South China Sea on Tuesday, a U.S. Department of Defense official said, prompting anger in Beijing which denounced the patrol as illegal and a threat to peace and stability.

The USS William P. Lawrence guided-missile destroyer traveled within 12 nautical miles (22 km) of Chinese-occupied Fiery Cross Reef, Defense Department spokesman Bill Urban said. The so-called freedom of navigation operation was undertaken to "challenge excessive maritime claims" by China, Taiwan, and Vietnam which were seeking to restrict navigation rights in the South China Sea, he said.

"These excessive maritime claims are inconsistent with international law as reflected in the Law of the Sea Convention in that they purport to restrict the navigation rights that the United States and all states are entitled to exercise," Urban said in an emailed statement.