President Xi Jinping has an unwritten deal with the Chinese people: Give me total political control, and I will solve China’s problems and make it a global superpower. This implicit social contract had seemed to be working pretty well until the coronavirus outbreak.

The epidemic that began in Wuhan in December has spread deep into China’s social fabric. It has grown into Xi’s most serious challenge since he became president in 2013 and is the biggest potential threat to China’s leadership since Tiananmen Square. Police-state control mechanisms may intimidate citizens, but they haven’t worked very well with a disease — and one collateral casualty has been public trust in the country’s leadership.

The threat of coronavirus will eventually ease as the arc of infection crests and then falls. The intriguing question for China analysts is what political residue this affair will leave. Xi’s leadership — along with his tactics of total social control — has been shown to be fallible. How does he repair his image and regain the confidence of the nation that he leads with a political version of the Mandate of Heaven?

“This is a substantial challenge for Xi, without question,” says Christopher K. Johnson, a former top CIA China analyst who is now a senior fellow at the Center for Strategic and International Studies. Given Xi’s track record of success, Johnson predicts that he’s likely to stay on top through deft maneuvering, but he cites several factors that could complicate this recovery.

The virus itself is still a mystery. Experts expect the number of new cases to begin to recede soon, but what if it doesn’t? What if the government’s effort to protect the economy by forcing a return to work causes a fresh contagion or the epidemic persists into the summer? Xi would have to turn to People’s Liberation Army generals and other security chiefs for help, but Johnson detects some hints that the military is already grumbling about cleaning up a mess created in part by the bad political decision to suppress information about the outbreak back in December.

Another eerie possibility is that the epidemic could spread within the Chinese leadership cadres. Senior officials tend to live and work in protected enclaves for security reasons. But that clustering and centralization could turn leadership compounds into petri dishes if China is unlucky.

The final, overriding issue is political and social stability — always the abiding concern of the Politburo and top cadres. For now, the Politburo will surely support Xi, following the precept of authoritarian states that leaders must hang together or they will each hang separately. But past practice suggests that after the crisis has passed, the Politburo will enter an evaluative phase to assess how the system performed.

Xi’s ruthless consolidation of power has made him the strongest leader since Mao Zedong but also uniquely vulnerable to criticism that he has overreached.

Xi purged party and military leaders after taking power. He is creating an elaborately woven network of control, with citizens receiving social-credit scores, to help suppress dissent. He shattered the collective leadership model that had prevailed since Mao’s death in favor of a ruthless executive and a new cult of personality around him.

This super-dominant role is Xi’s brand. As Chinese citizens ask what went wrong with the coronavirus, they will inevitably wonder about the role of the man who briefly ventured out in Beijing Monday, supposedly at the “front lines” of the epidemic, wearing a face mask and joking with residents, “This is a special period so we will not shake hands.”

Xi has faced other reversals lately. He hasn’t found a way to suppress the pro-democracy protests in Hong Kong that began in earnest last June in a movement that is driven by young activists but has broad popular support. Then, in January, Taiwan’s President Tsai Ing-wen won a landslide victory on a program that directly challenged Xi. Her opponent, Han Kuo-yu, proposed a Xi-like social contract, “Safety for Taiwan, money for the people,” and he was crushed.

Xi has a pesky problem in the White House, too. President Trump bobs and weaves on China policy, slapping on tariffs and then partially removing them, proclaiming whenever he can a version of “Xi is my friend” but then taking actions that destabilize China. White House officials were even said to have discussed recently whether to publicize the fact that Wuhan has a “National Biosafety Laboratory,” raising the almost certainly bogus idea that the coronavirus escaped from a bio-weapons lab.

Xi has promoted what he likes to call the “Chinese dream” of national ascendancy. We’ll see how it fares during these nightmare weeks when the maximum leader is facing maximum difficulty.

Read more: