China was accused of detaining Panama-flagged ships in a dispute over control of the Central American country's strategic canal.