North Korea is an isolated, impoverished, impulsive rogue nuclear state ruled by a family that has built one of the most terrifying personality cults the world has ever seen.

As result, Pyongyang doesn’t have a lot of friends.

The one country that North Korea can depend on is China. Beijing provides Pyongyang with much of its food and weapons—and is bound by treaty to support the North in the event of war with South Korea. China and North Korea have a reputation for being closely aligned, both militarily and ideologically.

Except that Sino-North Korean relations are not what they once were. More and more, Beijing views Pyongyang as a liability. And that’s leading to some seismic shifts in Asia’s power dynamics.

After 20 years of sustained growth, China is an economic powerhouse and a regional military power with expanding ties to the rest of the world. North Korea, by contrast, has clung to political and economic systems that have bankrupted and starved its people. Pyongyang has pursued nuclear weapons over other countries’ nearly unanimous opposition.

North Korea doesn’t seem interested in changing. Nor in listening to other governments.

Indeed, as former president Kim Jong Il’s health deteriorated near the end of his 17 year rule, Beijing met with American delegations to talk about cooperating in the event of North Korea’s collapse.

As it turned out, Kim Jong Il’s son Kim Jong Un took over leadership in 2011, forestalling a statewide implosion. Kim Jong Un continued his father’s aggressive rhetoric. This, along with strengthening trade ties between China and South Korea, is fundamentally changing China’s relationship with its troublesome ally.