Chinese President Xi Jinping could not have anticipated the America that he was jumping into when he came to visit last week.

He was competing for Americans’ attention with the visit of Pope Francis, unmatchable in its attraction. No one could have foreseen in advance that Speaker of the House John A. Boehner, the Ohio Republican, would throw in a tear-soaked towel. Volkswagen’s failed attempt to defraud government  emissions control efforts came in a pale third, but still probably ahead of Mr. Xi in popular interest.

Nonetheless, he achieved his goals here, and, although we don’t know exactly what passed between him and President Barack Obama, we will assume that the meeting between the heads of state of the world’s two largest economies and two most important global sparring partners for the foreseeable future was meaningful and permitted a frank exchange of views.

Clear statements of the two’s goals and objectives were what was required. Both countries are symbolically wearing sandals and so there are a number of exposed opportunities for China and the United States to step on each other’s toes in the coming years in a number of areas.

Advertise with us

The most dangerous of these is the military. Mr. Xi has at home a large and ambitious military that is seeking to establish martial predominance in its region commensurate with China’s growing economic and political importance. Mr. Obama is faced at home with a much more costly but nonetheless ambitious military machine that continues to seek aggressively a large piece of a shrinking budget pie.

The risk is that the two bump into each other, in the South China Sea or elsewhere, setting off expensive but unnecessary conflict. Mr. Obama can keep the American military under control through 2016. Mr. Xi’s mandate likely runs to 2023.

The most important area of competition remains economic. Mr. Xi indicated his understanding of this reality through extensive meetings with American business leaders. Americans should understand that the state of economic health of both countries is closely interrelated and has heavy impact on the whole rest of the world. The visit was useful.

Meet the Editorial Board