A nuclear North Korea is as much a problem for China as it is for the United States. The inability to manage a tinpot dictatorship and a failed economy right next door raises the question of just how much China deserves recognition as a superpower and central force in Asia.

In the Korean War, China lost 400,000 men, killed or wounded defending North Korea. It was a heavy cost to pay to keep U.S. and South Korean forces at bay below the 38th parallel. It was rewarded with a dictatorship that it has always found hard to control.

As the Korean War ended, post-revolutionary China was in no shape to support its own people, let alone the nation next door. So it was that the Soviet Union served as North Korea's main ally until its collapse in 1992.

Kim Il-sung, the founding father of modern North Korea, had a testy relationship with both China and Russia. In securing power, he purged high-ranking enemies allied with both states.

It is by default, then, that China has become North Korea's nanny state. That wasn't a problem when Kim's son, Kim Jong-il, spent most of his time obsessing over Japanese movie stars and directors. It has become much more of a headache now that Kim Jong-un, second grandson of the country's founder and therefore not the natural heir to the Korean throne, has pushed his claim by magnifying the North's nuclear might.

Image placeholder title

It's said that Chinese President Xi Jinping is weary, if not furious, at Kim's antics. Xi is intent on depicting himself as Mao Zedong's natural successor. Appropriately enough, then, he has run into the same problem as Mao.

Neither subtle persuasion nor economic bribery have worked in containing the dictator next door. An invasion by China's U.S.-backed rivals in South Korea and even Japan is unthinkable. It's been suggested, rather implausibly, that China should now invade North Korea to bring it to heel.

China supported the last set of sanctions on North Korea, alongside Russia. Now, it is Russian President Vladimir Putin advising (correctly) that the North Koreans would "rather eat grass" than give up their nuclear program, and that further sanctions of any kind would be "useless and ineffective." 

Putin made his comments in the coastal Chinese city of Xiamen, where he was attending a summit of the leaders of the BRICS nation. China, notably, encouraged further diplomacy but, according to the South Korean foreign minister, is open to sanctions, too.

Continued nuclear tests and improvements in missile technology by North Korea are a threat to China's rising power in Asia. They only encourage Japan and South Korea to consider a change in tack that would see them pursue the same.

China, in fact, shares a border with the bulk of the world's nuclearized nations: Russia, India, Pakistan and North Korea. It is partly at fault for that situation. It shared nuclear technology with Pakistan to counterbalance India, as this New York Times article explains, technology that was ultimately transferred to North Korea.

Indirectly, then, China is responsible for Pyongyang's nuclear power. There's debate as to whether the transfer was unintentional or deliberate, but accomplished via Pakistan to offer a screen of deniability. Either way, the result is very clear.

China has not sent an official delegation to North Korea in almost two years. It would prefer to see the United States take on a greater role in handling Kim and the North. But the United States should head down that path only with China, South Korea and Japan as allies -- Russia, too, if Putin can be dragged.

It is "less likely than war on the Korean Peninsula" for the international community, "major powers," and Asian nations to accept a nuclearized North Korea, the state-backed Global Times newspaper says in an editorial on Wednesday. It upsets the Northeast Asian geopolitical pattern; it flies in the face of the nuclear nonproliferation principle.

That is a far cry from the opinions expressed before this current crisis by Cui Lei, a researcher for the China Institute of International Studies, a think-tank overseen by China's foreign ministry.

"It's now pointless to deny that North Korea has gone nuclear," he wrote. "We should re-adopt our India-Pakistan approach: acquiescence in North Korea's nuclearization, while refusing to legalize it." Doves like that have now been replaced by hawks, as the Financial Times wrote in a recent article.

Curiously, the Global Times editorial says it is down to Seoul to solve the problem. "Cracks seem to be appearing in the Washington-Seoul alliance," it says, China's dream outcome. Washington is too far away and has "no incentive to solve this crisis in a way that doesn't fit its national interests."

Neither does China, despite its proximity. But what, now, are its national interests? That is very hard to say. An invasion of its own? Propping up a puppet state? Sanctions that could cause a humanitarian crisis? Nuclear appeasement?

None of the options is all that attractive. It's clear, though, that the problem is now too massive to ignore, whether you are in Washington or Beijing. China's inner circles of power will not express what they currently really think about North Korea. But they are conflicted, unhappy -- and for now, holding fire on what to do.

This article originally appeared at 09:00 ET on Real Money, our premium site for active traders. Click here to get great columns like this from Jim Cramer and other writers even earlier in the trading day.

See how North Korea's missile program has developed since it began. 

More of What's Trending on TheStreet: