Beijing’s primary concern with respect to the Korean peninsula remains the stability of the region. If Pyongyang collapsed, refugees and armed North Korean soldiers, fissile material, or even nuclear fallout, could stream over the Yalu and Tumen rivers, which form the border with northeast China, presenting a major challenge to its own stability. To prevent this, China has historically acted to ensure that the regime in Pyongyang remains economically viable and that the United States and its allies do not attack. Some in Beijing still see North Korea as a buffer against American power: if U.S. forces invaded, the result could be a peninsula unified under a pro-American liberal democracy, with U.S. troops stationed on China’s border. Over the years, these concerns have caused China to back North Korea against American threats. However, in recent years, there have been an increasing number of voices in Beijing who see North Korea less as a pillar for regional stability and more as a threat to it.

In recent years, China’s military has begun preparations for instability with North Korea, starting at the border. Since at least 2013, Chinese military units in the Jilin and Liaoning provinces that border North Korea have received considerable resources. A new border-defense brigade has conducted publicized drills and exercises, reinforcing the existing border guards. A 24-hour video surveillance system and drones watch the river for signs of intrusion. If an economic crisis in North Korea sent refugees to the Chinese border, these units would attempt to seal it.

These steps send strong signals to both Pyongyang and Washington. For years, China has resisted American overtures to discuss and jointly plan for collapse scenarios, a stance that, in effect, supported the Kim regime. By remaining ambiguous about its intentions, Beijing kept Washington from applying maximum pressure to Pyongyang or planning for a conflict. It’s not difficult to imagine U.S. and Chinese forces coming into contact as both race to secure North Korea’s nuclear facilities, leading to a wider conflict. Border fortifications are a sign that the debate in Beijing is evolving to recognize that North Korea is a source of instability and therefore a threat.

China took another major step towards addressing the North Korean menace in August when General Joseph F. Dunford, the highest-ranking U.S. military official, visited China and was shown live fire drills at its northern theater command in Shenyang, not far from the North Korean border. Dunford also reported that he had discussed a North Korea “contingency” with China, and the two sides signed an agreement to improve communication between the militaries. Though any coordination would surely be slow to develop, from Pyongyang, this could all look like an ominous sign of an emerging united front.