The U.S. Navy has sailed a warship through the Taiwan Strait, a move that came the same day that Beijing warned it would not rule out using force against self-ruled and democratic Taiwan to halt any move toward formal independence.

The "USS Antietam conducted a routine Taiwan Strait transit July 24-25 ... in accordance with international law," Cmdr. Clay Doss, a spokesman for the U.S. Navy's 7th Fleet, told The Japan Times in a statement Thursday.

"The ships' transit through the Taiwan Strait demonstrates the U.S. commitment to a free and open Indo-Pacific," he said. "The U.S. Navy will continue to fly, sail and operate anywhere international law allows."