When President Xi Jinping of China made his first state visit to the United States in 2015, he wrapped his demands for respect in reassurances.

He courted tech executives, while defending China’s internet controls. He denied that China was militarizing the disputed South China Sea, while asserting its maritime claims there. He spoke hopefully of a "new model” for great power relations, in which Beijing and Washington would coexist peacefully as equals.

But back in China, in meetings with the military, Xi was warning in strikingly stark terms that intensifying competition between a rising China and a long-dominant United States was all but unavoidable, and that the People’s Liberation Army should be prepared for a potential conflict.