A U.S. combat ship used agreed codes for unplanned encounters when it met a Chinese vessel during a recent patrol of the contested South China Sea, according to the vice chief of naval operations.

The USS Fort Worth met a Chinese military vessel near the disputed Spratly islands, Adm. Michelle Howard told reporters on Tuesday in Singapore. Its patrol this month was the first time a U.S. Littoral Combat Ship operated in waters around the islands, which are claimed by countries including China, the Philippines and Vietnam.

"We had previously agreed with the Chinese, if we met at sea, to use code for unexpected encounters at sea," said Howard. "Fort Worth came across one of our counterparts and they did do that, so things went as professionally as they have since that agreement was made."