North Korea's third nuclear test poses the first diplomatic and security challenge for China's leadership under Xi Jinping, while triggering heated debates in the West on Beijing's possible moves.
For China, Pyongyang's action was shockingly flagrant. The underground explosion was conducted near the Chinese border, generating a 4.9-magnitude earthquake, which startled residents in neighbouring Jilin province.
China's national security was threatened. But it has no effective leverage to deal with the recalcitrant neighbour; Beijing is caught between the two unfavourable outcomes of its Pyongyang policy.
First, tightening the rope of UN sanctions could well push Pyongyang into the arms of the United States. It should be noted that North Korea informed the US, along with China, before detonating the bomb. Obviously, one purpose was to use the nuclear device as a bargaining chip for direct negotiations with Washington, to gain international recognition, or aid.
Second, if Beijing were to accept Pyongyang's provocation, it could spark the nuclear armament of South Korea and Japan. Pyongyang's bellicosity has already precipitated substantial discussions of a missile defence system involving the US, Japan and South Korea, which Beijing has vehemently opposed.
The nuclear test marks the beginning of the end of the comradeship between Beijing and Pyongyang. In fact, the two have long been at ideological odds because the Chinese are deeply averse to the anachronistic policies of the bleak Orwellian kingdom.
Therefore, expect an overhaul of China's policy on North Korea. As the new Chinese leaders have been more assertive in defending Chinese interests, a new start in China's Pyongyang policy is widely deemed inevitable after Xi becomes president next month.
However, Beijing will not go too far. China's outspoken state-run newspaper Global Times said in an editorial that China would no longer treat North Korea as an ally. But "China should avoid taking all the heat and becoming North Korea's No 1 enemy". This seems to be the new bottom line.
In recent years, Beijing's policy on North Korea has been an undeniable failure, as have the six-party talks, which China hosted.
But China didn't fail in one area: maintaining close consultations with the US. The co-operation between the US and China has been and will continue to be the fundamental element in maintaining peace and stability in the Asia-Pacific region, especially in northeast Asia.
On the day of the North Korean test, Foreign Minister Yang Jiechi conferred over the phone with US Secretary of State John Kerry. While Beijing's suspicion over a US "pivot" to Asia is well known, the long-existing basis for Sino-US co-ordination has not changed. Deeper mutual understanding and trust with the US is the only way Beijing can rebuff Pyongyang's blackmail.
Presently, the foreign policy of both Beijing and Washington is in flux; this time of tune-setting will decide the mood for bilateral relations for at least the next decade. Thus, both sides should turn the current crisis on the Korean Peninsula into an opportunity to lay the groundwork for further co-operation.
Beijing hopes the US won't take advantage of its enlarging rift with Pyongyang. Washington hopes Beijing can halt Pyongyang's provocations, preventing any possibility of North Korea becoming a nuclear state.
Both have to work together on the denuclearisation of the peninsula, no matter how tough the task might be.
Beijing's new leadership is currently being tested for its diplomatic sophistication in working to end the North Korea nuclear crisis and in maintaining regional stability. Failing to do so will result in tangible setbacks in its efforts to gain international respect.
Yun Tang is a commentator in Washington. email@example.com