U.S. military officials complained Monday that a Chinese warship harassed a U.S. Navy vessel as it sailed through the South China Sea, adding to a growing roster of disputes between the two countries in a sudden escalation of tensions.

The ship complaint comes as the latest episode between Washington and Beijing after a year-long trade and tariff war has spilled over into political conflict and military strains between the rival powers.

Rhetoric...