BEIJING — The two men stood together on the reviewing stand in the North Korean capital: a top official in China’s Communist leadership wearing a tailored business suit and a young dictator in a blue jacket buttoned to his chin.

Liu Yunshan, the visiting Chinese dignitary, and Kim Jong-un, the North Korean leader, tried to put on a show of friendship, chatting amiably as the cameras rolled, but just as often they stood silent, staring ahead as a military parade passed before them.

Nearly two years have elapsed since that encounter, the last high-level visit between China and North Korea. The stretch of time is a sign of the distance between two nations with a torturous history: one a rising power seeking regional dominance, the other an unpredictable neighbor with its own ambitions.

China has made little secret of its long-term goal to replace the United States as the major power in Asia and assume what it considers its rightful position at the center of the fastest-growing, most dynamic region in the world.