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 test poses a major foreign policy challenge to Xi, the new head of the Communist Party, who has said he wants the US and China to develop a "new type of relationship between two great powers." How he deals with North Korea in the coming period could tell the US what kind of leader he will be, and what kind of relationship he envisions with Washington.
To improve the strained relationship with the US, Xi could start with getting tougher on North Korea, harnessing China's clout with the outlier government to help slow down its nuclear programme. If Xi does not help in curbing the North Koreans, he will almost certainly face accelerated ballistic missile defence efforts by the US in Northeast Asia, especially with Japan, an unpalatable situation for China.
But if Xi took the measures against North Korea that the US wants, Chinese and American analysts say, he would risk destabilising North Korea, spurring its collapse and pushing the creation of a unified Korean Peninsula that could well turn out to be an American ally. An American controlled Korean Peninsula is not an option for Xi, the analysts agree.