BEIJING — It took thousands of infections and scores of deaths from a mysterious virus for China’s authoritarian leader to publicly say what had become glaringly obvious to many in recent weeks: The country is facing a grave public health crisis.

After his declaration, the leader, Xi Jinping, put China on a virtual war footing to cope with the unfolding epidemic of the coronavirus. He convened an extraordinary session of the Communist Party’s top political body, issuing orders for handling the crisis with the crisp, somber stoicism of a field marshal.

“We’re sure to be able to win in this battle,” he proclaimed on Saturday before his six grim-faced colleagues on the party’s Politburo Standing Committee.