BEIJING -- Chinese President Xi Jinping must have been seething.
Just four hours before a series of meetings with the leaders of the BRICS nations -- Brazil, Russia, India, China, and South Africa -- kicked off in the southeastern Chinese city of Xiamen, North Korea conducted its sixth nuclear test. The three-day summit, which ran through Tuesday, were meant to showcase Xi's diplomatic achievements ahead of the ruling Chinese Communist Party's congress in October, and strengthen his claim to be the leader of the emerging economies.
Pyongyang spoiled the party with its detonation earlier on Sunday.
Xi had high hopes for the event, as was apparent in his opening address. In it, he reflected on his 17 and a half years in top-level politics in Fujian Province, starting in 1985, when he became vice mayor of Xiamen. But although the speech was meant to cap his triumphant return to the city where his career began, Xi wore a stiff expression.
North Korea's nuclear test was its first in a year and believed to be its most powerful to date. It was as if Pyongyang timed the explosion to set Xi's nerves on the edge: North Korea claimed to have successfully detonated a thermonuclear warhead small enough to be mounted onto an intercontinental ballistic missile in what it called an "important announcement" immediately before Xi's speech.
Xi concluded his address by saying that BRICS are working with the international community for world peace and development. He made no reference to the North's test.
But however irked the Chinese president may be, so far it has not motivated him to rein in his wayward client, Kim Jong Un.
Xi has consistently called on his U.S. counterpart, Donald Trump, to seek dialogue with North Korea in hopes that Pyongyang can be enticed into giving up its nuclear weapons. Trump, however, prefers sticks to carrots. He wants China to impose tougher sanctions, such as halting oil shipments to North Korea.
Timing his test to coincide with the first day of the BRICS meetings, Kim seemed bent on mocking Xi's dovish line.
Xi's patience may be wearing thin, but there are a number of reasons why he hesitates to slap tougher sanctions on the North. First, the Communist Party congress begins Oct. 18. At that gathering, the Chinese leadership will be reshuffled and Xi will begin his second term as the head of the party. As Xi eyes a third term, the congress is meant to display his sure-handed leadership on the world stage.
Ahead of the event, the Chinese Foreign Ministry had stressed what the Chinese government calls "home-ground diplomacy," under which it held a number of large international conferences chaired by Xi and attended by other world leaders.
Its purpose was revealed in a paper published by Foreign Minister Wang Yi in early this year. In it, Wang said he would contribute to efforts to hold a successful congress. The ministry would use all diplomatic means to demonstrate that Xi, who was recently named the "core" of the party, is also a leader in the international community.
Chinese officials suspect Pyongyang was well aware of the importance of China's diplomatic push and deliberately timed the nuclear test to coincide with the opening of the BRICS summit to sabotage the effort.
It would not be the first time. In May, North Korea launched a ballistic missile on the first day of an international conference China was hosting in Beijing to promote its Belt and Road Initiative, which is aimed at creating a vast economic bloc stretching from Asia to Europe.
There are also signs the North Koreans calculated that Xi would be reluctant to take tough measures, such as an oil embargo, ahead of the party congress, fearing a violent response from Pyongyang or economic disruption. Indeed, the North appears to be stoking the crisis, betting that Xi will plead with Trump to refrain from using force and engage in dialogue, rather than resorting to force to halt the North's nuclear program, as the U.S. president has threatened to do.
It is a clever gambit. If the U.S. takes military action, it could throw the Korean Peninsula into chaos, completely overshadowing China's party congress.
But for Xi, having no viable tools to sway North Korea's behavior also damages his credibility, particularly because the BRICS summit on Monday adopted a declaration expressing "deep concern over the ongoing tension and prolonged nuclear issue on the Korean Peninsula." That language is widely taken to show Beijing's strong displeasure over the North's nuclear test.
But inserting that line may be the best that Xi can do; there is no way of telling how Kim Jong Un might respond to any sterner action. One North Korea expert has said Kim will target his nuclear missiles at China the moment he begins to see the country as an enemy.
If China's security is threatened, Xi's political opponents would have ammunition to attack him. North Korea is thus Xi's biggest potential obstacle to solidifying political power, which appears to include plans for a third term as China's president.
When he appeared at a news conference after the close of BRICS summit on Tuesday, Xi was unsmiling and said nothing about North Korea. He was no doubt preoccupied with how he can turn the party congress in his favor despite the latest upheaval.