(CNN) The US Navy sailed a warship within 12 nautical miles of two contested islands in the South China Sea Wednesday, part of what it calls a "freedom of navigation operation" (FONOP)

The guided-missile destroyer USS Wayne E. Meyer "sailed within 12 nautical miles of Fiery Cross and Mischief Reef in order to challenge excessive maritime claims and preserve access to the waterways as governed by international law," US Navy Cmdr. Reann Mommsen, a spokesperson for the US 7th Fleet, told CNN in a statement.

"The United States will fly, sail and operate wherever international law allows," she said, adding that freedom of navigation operations "are not about any one country, nor are they about making political statements."

The US has long accused China of installing military facilities on man-made islands at Fiery Cross and Mischief Reef

A US defense official told CNN that a Chinese military vessel followed the US warship during the operation, adding that all interactions were safe and professional.

Read More