North Korea's latest nuclear test on Tuesday is putting some strain on its all-important relationship with China, which gives its angry little neighbor absolutely essential support: everything from money to energy to diplomatic cover at the United Nations.

But why does China bother to prop up North Korea, anyway? The pariah state is a diplomatic and economic liability, an albatross around China's neck as it tries to shape itself into a responsible global power.

There a number of reasons, some of them rational and some not, but China's strategy boils down to these oft-repeated, six little words:

No war, no instability, no nukes.

It's as much a strategy as it is a mantra, often rendered in the original Chinese: 不战、不乱、无核. And the order matters, listing China's priorities from highest to lowest.

The first priority -- no war -- goes back to the Korean War, which cost hundreds of thousands of Chinese lives and almost ended with a unified, pro-American Korea right on China's border: Beijing's nightmare.

The second priority -- no instability -- means that Beijing wants to keep North Korea from collapsing, which could cause China all sorts of problems -- streams of Korean refugees, loose nuclear materials (see priority No. 3) and the risk of the war that China so wants to avoid.

The third priority -- no nukes -- is clearly last of these three, as China would prefer a stable and nuclear North Korea to an unstable but nuke-free one. But it's still a big priority. An insightful report by the Center for Strategic and International Studies explains why:

Although the Chinese do not view North Korea's acquisition of nuclear weapons as an existential threat to China, there are worries that a perception of a growing nuclear threat could lead South Korea, Japan, and even Taiwan to develop nuclear capabilities. North Korea's nuclear programs and demonstrated provocations have already prompted the United States, Japan, and South Korea to strengthen defense coordination and have led Tokyo and Seoul to enhance their missile defense. These developments are judged to have had a harmful impact on China's security environment.

So, here it is again: the six words that, in order, explain why China goes to such lengths to prop up North Korea despite the costs.

No war, no instability, no nukes.