China’s ruling Communist Party is preparing to hold its national congress on Wednesday where President Xi Jinping is expected to consolidate his power and head on a second five-year term in office.
Amid the stability he has achieved in China during his term in office, beyond the borders, the situation is not so calm.
There, he is at the mercy of two unpredictable men, US President Donald Trump and North Korean strongman Kim Jong Un - a predicament that points to the limits of China's bid to project soft power, said an Agence France Presse report.
Some analysts say Kim could try to cause a stir by testing another missile or nuclear bomb in the middle of China's most important political event, which is held every five years.
A new test could trigger another 140-character salvo by Trump, who has alternated between prodding and praising Xi's response to North Korea.
Trump's mercurial Twitter diplomacy has contrasted with Xi's unemotional style. The US leader has also pointedly left Xi hanging over whether he will hit China with tariffs over trade grievances.
Despite the mixed messages, Xi has professed his friendship with Trump, confirming an invitation for the US president to come to Beijing next month, when they will discuss trade and North Korea face-to-face.
His relationship with Kim is also complicated.
The North Korean leader has already interfered with two international summits that the Chinese president has hosted this year, by staging headline-grabbing provocations.
In May, as Xi prepared to address world leaders gathered in Beijing on his signature Belt and Road initiative - a Chinese-led trade infrastructure program - the North successfully launched a new ballistic missile.
Then in September, it conducted its most powerful nuclear test to date, hours before Xi took the stage for a speech before leaders of the developing world at the annual BRICS summit.
The timing was seen as a slight towards Xi and an attempt by Kim to strongarm his Chinese neighbor into convincing Trump to sit down for talks.
A new nuclear test during the party congress "would be more than a loss of face. It will harm the ruling party of China," said Cheng Xiaohe, an associate professor of international relations at Renmin University in Beijing. "It will harm Xi Jinping at this crucial moment."
On Wednesday, Xi will address the nation to lay out his political and economic vision for the world's second-largest economy over the next five years.
Villages will broadcast news of the congress over loudspeakers, a security crackdown has been extended and monitoring of dissidents strengthened.
Xi, who is expected to get a second five-year term as party leader at the gathering, will kick off events with an address indicating whether his personal political theory will be entered into the party constitution alongside those of predecessors such as Mao Zedong and Deng Xiaoping.
Xi's speech is also expected to recommit the party to achieving the goals of a "moderately well-off society" by 2021 — the 100th anniversary of the party's founding — and even greater national power and prosperity by 2049 — the centenary of the founding of the Communist state.
Those achievements will depend on continued economic growth and the lifting of millions out of poverty, alongside the continued rapid expansion of Chinese military and political power, including its growing ability to dominate the Asia-Pacific region.
While the nation's presidency is limited to two five-year terms, the office of party general secretary is bound by no such restrictions. Xi, 64, could step aside for a younger leader while maintaining ultimate control from behind the scenes.
Whatever the outcome, most analysts say Xi has largely completed the task of sidelining his competitors in other cliques, including those surrounding his immediate predecessor, Hu Jintao, and former leader Jiang Zemin.
"Xi has been extremely successful in purging political rivals," said Feng Chongyi, an expert on Chinese politics at Sydney's University of Technology. "There will be only one faction left after the 19th congress."
The 2,287 carefully hand-picked delegates to the congress are drawn from 40 constituencies, including the 31 provincial-level administrative districts, the government, the military, state industries and grass-roots organizations representing most of the party's 89 million members.