The Chinese navy said it expelled a US Navy ship that entered its territorial waters in the South China Sea, while the US defended the operation as legal under international law.