The authorities in Pyongyang said scientists had set off a “miniaturised” nuclear device with a greater explosive force than those used in two previous nuclear tests, in 2006 and 2009.

“It was confirmed that the nuclear test that was carried out at a high level in a safe and perfect manner using a miniaturised and lighter nuclear device with greater explosive force than previously did not pose any negative impact on the surrounding ecological environment,” KCNA, the North’s official news agency, announced.

The agency said the test had been in response to “outrageous” US hostility that “violently” undermined the regime’s right to peacefully launch satellites – a reference to the condemnation and tighter sanctions that greeted Pyongyang’s successful rocket launch almost two months ago.

The nuclear test by North Korea on Tuesday, in defiance of warnings by China, leaves the new Chinese leader, Xi Jinping, with a choice: Does he upset North Korea just a bit by agreeing to stepped up United Nations sanctions, or does he rattle the regime by pulling the plug on infusions of Chinese oil and investments that keep North Korea afloat?

[…] The Obama administration excoriated Mr. Hu [Jintao] after North Korea’s second nuclear test in 2009, accusing him of “willful blindness” to the country’s actions.

“With Hu out of the picture the administration is intent on determining whether Xi Jinping will prove more attentive to U.S. security concerns,” Jonathan D. Pollack, director of the John L. Thornton China Center at the Brookings Institution said. “How Xi chooses to respond will be an important early signal of his foreign policy priorities and whether he is ready to cooperate much more openly and fully with Washington and Seoul than his predecessor.”

“Perhaps Kim Jong Un thinks Xi Jinping will indulge him. Perhaps he’s in for a surprise,” said Richard Bush, Director of the Center for Northeast Asian Policy Studies at the Brookings Institution in Washington D.C.

[…] “At the start, China gave him a warm welcome and, I think, some aid. But we got no gratitude. They take us for granted,” said Jin Canrong, an international affairs expert at Renmin University in Beijing. “China tried to get closer to him, but it was not successful. China has become very disappointed.”

Yet Beijing also sees Pyongyang as a crucial buffer against U.S. troops based in South Korea and Japan. It also deeply fears a regime collapse could send swarms of refugees across its border. For those reasons, Beijing is unlikely to cut Pyongyang adrift, even if it pushes North Korea harder to end its nuclear provocations and reform its broken-down economy.

For all the concern in some quarters about North Korea’s wayward behavior, that dread of losing a buffer still prevails among China’s most influential policy makers, particularly in the military, according to Jia Qingguo, a professor at Beijing University’s School of International Studies who is a proponent of a new policy toward North Korea.

“It’s better than before, but it is still difficult to overcome” the mind-set, he said. “A lot of people are taking the very old-fashioned belief that North Korea is a strategic buffer, and they still believe American invaders would march over North Korea to come to China.”

[…] Despite the strains, many analysts are convinced that China remains a firm ally of North Korea. China was only blowing off steam by allowing news media criticism of Pyongyang, said Stephanie Kleine-Ahlbrandt, North East Asia director and China adviser for the International Crisis Group in Beijing.

“The traditionalists in the People’s Liberation Army and the International Liaison Department of the Communist Party control foreign policy [on North Korea],” she said. “The political relationship between China and North Korea right now is at a low point, but China’s longstanding priorities on the Korean Peninsula of no war, no instability and no nukes remain in that order of priority.”

[… A] South Korean embassy official told the Global Times that Seoul is well aware that North Korea rarely listens to Beijing’s advice. What South Korea expects is just pressure from China in line with the other participants of the Six-Party Talks to deliver a clear message before it attempts an audacious and defiant third nuclear test, the official said.

“This is a grave test of China’s diplomacy,” said Zhang Liangui, a professor on Korean Peninsula issues at the Party School of the Communist Party of China Central Committee.

If China fails to persuade North Korea to give up its plan for a fresh nuclear test or fails to deliver immediate and severe sanctions that could substantially hit North Korea after the test, China will forever lose the chance to play a dominant role on the Korean Peninsula nuclear issue and all the previous efforts to realize the denuclearization of the peninsula will have been in vain, Zhang said.

Now, more than ever, China might want to seem a contributor to regional peace. Its belligerence over the disputed Senkaku or Diaoyu islands has brought relations with Japan to their worst level since 1945, with China now considering Japan’s proposal for a summit between its prime minister, Shinzo Abe, and the Communist Party leader, Xi Jinping. China’s assertion of territorial claims in the South China Sea has soured relations there, too. The Philippines has been provoked into asking a UN tribunal to rule on whether part of China’s claim has a legal basis.

On both those issues China will find it hard to offer concessions. This week Mr Xi growled that “no country should presume that we will engage in trade involving our core interests or that we will swallow the ‘bitter fruit’ of harming our sovereignty, security or development.”

North Korea offers a chance for China to seem flexible without jeopardising any “core interests” and, indeed, to enhance its own security at the same time. The new treatment of North Korea could also strengthen China’s relations with South Korea, which were damaged by the failure to join the widespread international condemnation of the North for attacks on the South in 2010. And it would offer what Zhu Feng, a scholar at Peking University, calls “a new platform for China and the United States to get closer”.

Writer and critic Yao Bo took to Sina Weibo, China’s Twitter, asking, “Who can North Korea threaten with its nuke? It can’t reach America, and it doesn’t have any grievance with Japan. They share a language and culture with the South Koreans. What can they do besides threaten China? There are still people saying this is a good thing, and they must be mentally ill, beyond hope. Raising a mad dog to protect your house really is the logic of a patriotraitor [slang for a traitor who pretends to be a patriot].”

[…] Even Hu Xijin, editor of China’s party-line, state-run news organization the Global Times, remarked on Weibo, “North Korea just experienced a ‘man-made earthquake,’ which is likely a nuclear test. North Korea is headed down the wrong path. Its people will pay the price for the country’s mistakes. The legitimacy of North Korean rule should be reconsidered.”