Before an adulatory crowd of university professors and students, China’s leader, Xi Jinping, offered a strikingly bold message about the global coronavirus pandemic. Summoning images of sacrifice from Communist Party lore, he told them that the calamity was ripe with possibility for China.

“Great historical progress always happens after major disasters,” Xi said during a recent visit to Xi’an Jiaotong University. “Our nation was steeled and grew up through hardship and suffering.”

Xi, shaped by his years of adversity as a young man, has seized on the pandemic as an opportunity in disguise — a chance to redeem the party after early mistakes let infections slip out of control, and to rally national pride in the face of international ire over those mistakes. And the state propaganda machine is aggressively backing him up, touting his leadership in fighting the pandemic.

Now, Xi needs to turn his exhortations of resolute unity into action — a theme likely to underpin the National People’s Congress, the annual legislative meeting that opens on Friday after a monthslong delay.

He is pushing to restore the prepandemic agenda, including his signature pledge to eradicate extreme poverty by this year, while cautioning against complacency that could let a second wave of infections spread.

He must do all this while the country faces a diplomatic and economic climate as daunting as any since the Tiananmen Square crackdown in 1989.

“If you position yourself as a great helmsman uniquely capable of leading your country, that has a lot of domestic political risk if you fail to handle the job appropriately,” said Carl Minzner, a professor of Chinese law and politics at Fordham University. “That’s a risk for Xi going forward.”

So far, Xi has largely succeeded in rewriting the narrative in China.

The disarray in other countries, especially the United States, has given him a reprieve from domestic political pressure by allowing officials to highlight China’s lower death toll, despite questions about the accuracy of the numbers.

The Trump administration’s withholding of funds from the World Health Organization handed Xi a chance to appear munificent when he pledged $2 billion in assistance and promised to make any vaccine widely available.

Xi has cast himself as the indispensable leader, at the ramparts to defend China against intractable threats. The shift has provoked the party cadre — and by all appearances much of the public — to coalesce around his leadership, whatever misgivings they may have about the bungling of the outbreak.

“If we had frozen time at Feb. 1, this would be very bad for the Chinese leadership,” said Jude Blanchette, an analyst at the Center for Strategic and International Studies, a think tank based in Washington, D.C.

China’s leaders in the past have often invoked the theme of triumph over adversity, but for Xi, who turns 67 next month, the idea threads through his own biography.

His father, a famous revolutionary leader, was purged and held in solitary confinement under Mao Zedong. The younger Xi was hounded as a child after his father’s disgrace and later, during the Cultural Revolution, ritually denounced by his own mother and exiled from Beijing to labor in a village for seven years.

Joseph Torigian, the author of a forthcoming biography on the father, said Xi’s personal hardships did not erode his loyalty to the party — at least outwardly. He emerged instead steeled, a word his father, Xi Zhongxun, used to describe his time in prison and that the son used when speaking at the university. “This moment of challenge is what makes leaders in China great,” Torigian said of Xi’s worldview.

It is a dramatic turnaround from only months ago, when Xi faced a shaken and skeptical public. The party apparatus seemed to shudder as outrage over silencing warnings about the virus and other early mistakes spilled beyond the censors.

“I see not an emperor standing there exhibiting his ‘new clothes,’ but a clown who stripped naked and insisted on continuing to be an emperor,” a prominent real estate tycoon, Ren Zhiqiang, wrote publicly in March, prompting his arrest.

Xi made his first public appearance in the crisis only two days after ordering Wuhan, the central Chinese city where the coronavirus outbreak began, to be locked down in late January. He presided over an unusual televised session of the country’s top political body, the Politburo Standing Committee. By then, thousands of people had been infected and scores had died.

According to a lengthy account of the emergency that appeared in People’s Daily, the flagship newspaper of the Chinese Communist Party, he somberly told the committee that he had difficulty sleeping the night before — the eve of the Lunar New Year holiday.

Xi also seemed to shrink, temporarily, from his usual monopoly on center stage. He put the country’s No. 2 leader, Premier Li Keqiang, in charge of the government’s emergency response, possibly to position himself to deflect blame if the crisis worsened.

As China got the outbreak under control, the party’s propaganda pivoted again toward Xi, pushing the premier into the background. Li will deliver the keynote report to the National People’s Congress on Friday, but it will be Xi who dominates the acclamatory media coverage, likely dispensing advice to provincial leaders and delegates, and repeating policy priorities.

The People’s Daily account of the outbreak cited Li just once, taking orders from Xi to visit Wuhan. It mentioned Xi’s name 83 times. The piece garlanded him in tributes, describing the decision to close Wuhan as a brave personal act.

“Making this decision demands massive political courage,” Xi said the night of Jan. 22, hours before the lockdown, according to the account. “But when it’s time to act, you must act. Hesitation will only lead to chaos.”

There are few signs that Xi has been chastened by the failures in the beginning of the country’s fight against the disease — nor by the international criticism.

“All along, we have acted with openness, transparency and responsibility,” he told the World Health Assembly on Monday.

Xi, though, has warned that China faces an increasingly uncertain world. He has often leavened his promises of a bright future with warnings against a possible economic meltdown, foreign crisis or political decay. Last month, he sounded unusually ominous.

“Confronted with a grim and complicated international epidemic and global economic developments, we must keep in mind how things could bottom out,” he told a Politburo Standing Committee. “Be mentally and practically prepared to deal with long-lasting changes in external conditions.”

Perhaps the greatest challenge involves the economy, which contracted for the first time since China began its remarkable transformation more than four decades ago. The rising prosperity of millions of Chinese has been a pillar of the Communist Party’s legitimacy ever since.

In recent weeks during visits to three provinces, Xi has sought to return the focus to the policy agenda that predated the coronavirus. He went to coastal Zhejiang and two inland provinces, Shanxi and Shaanxi.

Wearing his trademark dark blue windbreaker and, when indoors, a mask, Xi has visited factories, ports, government offices and scenic spots trying to return to life while enforcing new safeguards against infection. In poorer inland villages, he has lingered over crops of wood ear fungus and chrysanthemum — the kinds of commercial farming crucial to his anti-poverty drive.

“Your wood ear fungus here is famous,” he told a clapping crowd of villagers in Shaanxi, Chinese television news showed. “This is your way out of poverty and into prosperity.”

But even the Communist Party’s polished propaganda stagecraft showing China overcoming the epidemic can reveal how life remains far from normal. Footage of his visit to Xi’an Jiaotong University indicated that the crowd of cheering students and professors waiting for Xi was arranged while the university remained largely closed.

“School hasn’t restarted yet, but here you all are,” Xi deadpanned, drawing scattered laughter from the crowd.

Throughout his efforts to revive the economy, Xi has exhorted officials to keep a tight lid on coronavirus cases as they move to restart business. “The risks of a rebound in domestic infections are ever-present,” he said this month from the Communist Party’s compound in Beijing.

For local officials, finding the right balance between reopening and averting outbreaks can be dangerously fraught. The party chief and other officials of Shulan, a city in northeast China, were dismissed after roughly 20 new cases were reported. The new cases prompted a lockdown and restrictions in surrounding areas.

“The deeper implications of COVID for China is still very much unclear at this point, but potentially monumental in hindsight,” said Adam Ni, the director of the China Policy Center, a research organization in Canberra, Australia.

If Xi can survive this year unscathed, he has mapped out a triumphant march to a Communist Party congress in 2022, when he could press for another five years as China’s top leader. Next year will bring the grandiose centenary of the founding of the Chinese Communist Party; and in the following year China will host the Winter Olympics.

“I’ve actually thought Xi Jinping had a fairly good run for another five years well before COVID-19,” Blanchette said. “That being said, COVID-19 is icing on the cake here.”

(May 20, 2020)