BEIJING — It was supposed to be Xi Jinping’s moment to bask in global prestige, as the Chinese president hosted the leaders of some of the world’s most dynamic economies at a summit meeting just weeks before a Communist Party leadership conference.
But just hours before Mr. Xi was set to address the carefully choreographed meeting on Sunday, North Korea’s leader, Kim Jong-un, detonated his sixth nuclear bomb.
Mr. Kim has timed his nuclear tests and missile launches with exquisite precision, apparently trying to create maximum embarrassment for China. And on Sunday, a gathering in southeast China of leaders from Russia, Brazil, India and South Africa, members of the so-called BRICS group, was immediately overshadowed by news of the test, which shook dwellings in China and revived fears of nuclear contamination in the country’s northeast region.
This is not the first time Mr. Kim has chosen a provocative moment to flaunt his country’s weapons. In May, he launched a ballistic missile hours before Mr. Xi spoke at a gathering of world leaders in Beijing assembled to discuss China’s signature trillion dollar One Belt, One Road project.
The confluence of North Korea’s nuclear testing and Mr. Xi’s important public appearances is not a coincidence, analysts said. It is intended to show that Mr. Kim, the leader of a small, rogue neighboring state, can diminish Mr. Xi’s power and prestige as president of China, they said. In fact, some analysts contended that the latest test may have been primarily aimed at pressuring Mr. Xi, not President Trump.
China always aims for domestic calm in the period leading up to the secretive congress, and so it is unlikely to do anything before Oct. 19, the start of the conclave, Mr. Zhao said.
The biggest concern for China’s leadership is the possibility of North Korea turning on China, the country’s only ally. “If cornered, North Korea could take military action against China, given the relationship has reached a historic low,” Mr. Zhao said.
China supplies more than 80 percent of the North’s crude oil, and suspending delivery would be the ultimate economic sanction, more far-reaching than those imposed, with China’s support, by the United Nations.
Even The Global Times, the nationalist, state-run newspaper, said several months ago that China should consider cutting off its oil supplies to North Korea if Mr. Kim detonated a sixth nuclear bomb. But with the party congress looming, the paper modified its position Sunday.
“The origin of the North Korean nuclear issue is the sense of uncertainty that is generated by the military actions of the U.S./South Korea military alliance,” the paper said. “China should not be at the front of this sharp and complicated situation.”
There were also some doubts whether severing oil supplies would make much a huge difference to the North Korean regime. “The economic effects will be substantial but not regime crippling,” said Mr. Hayes of the Nautilus Institute, which specializes in the North’s energy needs.
The hardships, he said, would be most felt by ordinary people, with less food getting to market and fewer people able to travel between cities in buses.
The North’s army has oil stockpiles for routine nonwartime use for at least a year, Mr. Hayes said. “They can last for about a month before they run out of fuel in wartime, at best; likely much earlier,” he said.
Another major concern for the Chinese government is the fears of residentsin the northeast of the country about nuclear contamination from North Korea’s test site at Punggye-ri, not far from the Chinese border.
Many residents in Yanji in Jilin Province, which borders the North, said they felt their apartments shake after the test. Some posted photos of stocks of food and drinks shattered on the floors of a grocery store. At first residents believed the cause was an earthquake, they said, and only later in the day heard the news from state-run media that North Korea had detonated a nuclear bomb.
“I was in my study when the earthquake began,” said Sun Xingjie, an assistant professor at Jilin University in Changchun about 350 miles from the North Korean test site. Mr. Sun said he checked with friends on social media, and they determined from the location and the depth of the explosion that it was a nuclear test.
Even though there is no evidence of any contamination from the test reaching China, it is a worry of residents, Mr. Sun said.
“We are at the border region, so we have a sense of fear about leakage from the nuclear test,” he said.
“Kim knows that Xi has the real power to affect the calculus in Washington,” said Peter Hayes, the director of the Nautilus Institute, a research group that specializes in North Korea. “He’s putting pressure on China to say to Trump: ‘You have to sit down with Kim Jong-un.’”
What Mr. Kim wants most, Mr. Hayes said, is talks with Washington that the North Korean leader hopes will result in a deal to reduce American troops in South Korea and leave him with nuclear weapons. And in Mr. Kim’s calculation, China has the influence to make that negotiation happen.
While some Chinese analysts say North Korea should be made to pay a price for its contempt of China, the North’s ally and major trading partner, they were not optimistic that Sunday’s test would change Mr. Xi’s determination to remain above the fray and not get his hands sullied trying to force Mr. Kim to change his ways.
Even the North’s claim that the weapon detonated was a hydrogen bomb that could be mounted on an intercontinental ballistic missile would probably not sway Mr. Xi, they said.
“This sixth nuclear test should force China to do something radical; this will be a political test,” said Cheng Xiaohe, a nuclear expert at Renmin University. “But the mood is not moving that way.”
China’s Foreign Ministry did express “strong condemnation” of the test. But despite the North’s repeated incitements, the Chinese leadership is likely to stick to its position that a nuclear-armed North Korea is less dangerous to China than the possibility of a political collapse in the North, Mr. Cheng said. That could result in a unified Korean Peninsula under the control of the United States and its ally, South Korea.
China fears such an outcome if it uses its greatest economic leverage: cutting off the crude oil supplies that keep the North’s rudimentary economy running.
“Cutting off oil supplies could severely impact North Korean industries and undermine the regime’s stability, a solution which China and Russian have serious qualms about,” said Zhao Tong, a fellow at the Carnegie-Tsinghua Center for Global Policy in Beijing.
China has put forward a proposal that hinges on North Korea stopping its nuclear testing in exchange for an end to American military exercises around the Korean Peninsula.
But Mr. Xi is consumed at the moment with domestic matters, Chinese analysts said. The political machinations surrounding the Communist Party’s National Congress that will convene in Beijing in mid-October to select new members of the ruling elite are at the top of his agenda. Mr. Xi will be awarded his second five-year term at the meeting.