The stage for the 19th National Congress of the Communist Party of China has been meticulously and carefully set. Yet while China’s authoritarian leaders have the power to dictate that nothing and nobody at home will distract them during their week-long deliberations, they cannot control events beyond their borders.

A country that could spoil China’s moment– and indeed Xi Jinping’s party – is North Korea, the Asian superpower’s communist neighbor and ally.

Judging by recent precedent, Beijing has every reason to be nervous.

Pyongyang has launched several missiles and conducted a huge nuclear test this year. And often, these occurred in the run-up to or during a national or international event important to China.

In March, when the National People’s Congress, the one-party state’s parliament, held its annual conference, North Korea fired a quartet of ballistic missiles. In April, just a day before Xi’s first meeting with US President Donald Trump, Kim Jong-un’s regime launched another missile. A month later, when Beijing was about to inaugurate a huge international summit for Xi’s signature trillion-dollar One Belt One Road initiative, the young dictator ordered another launch.

And at the beginning of last month, when Xi was hosting leaders from BRICS (Brazil, Russia, India, China and South Africa) nations at a key summit, Pyongyang detonated its sixth and most powerful nuclear test.

It seems likely that North Korea deliberately timed its missile and nuclear tests to disregard and embarrass the Chinese leadership.

Given their confluences, it seems likely that North Korea deliberately timed its missile and nuclear tests to disregard and embarrass the Chinese leadership.

Yet in terms of their significance, all the key events held by Beijing or attended by Xi in recent years are pale in comparison with the upcoming congress. Thus it is undoubted that Beijing is using all its leverage to make sure the country that it has defended and nourished over the past seven decades will not cause any distraction or interruption around the five-yearly congress.

Given this, coupled with the fact that China remains North Korea’s biggest economic partner and most important ally, Pyongyang is unlikely to provoke and embarrass Beijing at such a crucial time.

Should it stage a missile launch or a nuclear test in the upcoming days, that would definitely enrage Chinese leaders, and Xi Jinping in particular. It would probably break up the relationship between the two defense-treaty allies, which has already reached its lowest ebb since the Korean War (1950-53).

For Xi and other Chinese leaders, such a deliberate provocative and insulting move could be the last straw, prompting them to cut off their remaining support for Pyongyang.

For the isolated North Korea, a breakup with its giant neighbor would be hugely costly – economically, politically and diplomatically.

Against this background, Pyongyang’s behavior in the upcoming days is indicative of Beijing’s influence on its troublesome ally.

If the Kim regime behaves responsibly and causes no trouble during China’s most important political event, this will indicate that it still values ties with its communist neighbor.

In contrast, should it stage another missile launch or another nuclear test or a similar headline-grabbing provocation, such as firing multiple short-range rockets as recently speculated, this would not only signal that it no longer respects Beijing. It would also reveal that Kim detests Xi and his comrades in Beijing and is willing to defy and humiliate them.