(Bloomberg) — Cities across China are rolling out swift measures from mass-testing drives to lockdowns for just a mere handful of Covid-19 cases, aiming to keep flareups at bay and avoid the economic and social hardship endured by Shanghai.

Most Read from Bloomberg

Hangzhou, an e-commerce hub a short train ride from Shanghai, has started a mass testing drive, joining the capital Beijing in trying to stamp out outbreaks before they spiral out of control. The port city of Qinhuangdao, along with Yiwu — known for its production of Christmas decorations — have gone into full or partial lockdowns.

The hard-line responses reflect the growing stakes local governments face in wrestling with the highly infectious omicron strain before it takes hold, plunging cities into protracted lockdowns that incur heavy costs on residents and businesses.

Read more: Anger Erupts at Xi’s ‘Big White’ Army of Lockdown Enforcers

China’s dogged pursuit of Covid Zero, as the rest of the world lives with the virus and dismantles restrictions, has seen it slide in Bloomberg’s Covid Resilience Ranking of where the pandemic is being handled best with the least economic and social disruption.

Highly ranked in the first year-and-a-half of the pandemic, China has slipped to 51st among the 53 major economies tracked, with just Russia and the territory of Hong Kong scoring lower, dragged down by its increasing reliance on restrictions like lockdowns and its effectively closed international border.

Shanghai, which has become the biggest hotspot in China’s worst outbreak since the virus first emerged in Wuhan, has endured a month of lockdown that has kept most of the city’s 25 million residents confined to their homes.

The outbreak now appears to be stabilizing, with infections falling for a fifth day on Wednesday to 10,662 — the lowest in more than three weeks.

In Beijing, just 50 cases were reported yesterday, signaling mass-testing isn’t detecting a broader outbreak. The government currently has locked down several blocks in Chaoyang district as some early cases concentrated in that area, raising the risk of spawning further spread. It is also sealing off residential compounds across the city where infections have been detected from the ongoing mass testing.

“Beijing is going to prove one thing: whether having Covid outbreaks getting out of control in our mega-city is just a coincidence, or something inevitable,” said Hu Xijin, the retired editor-in-chief of Communist Party-backed Global Times newspaper and an influential commentator. “Could there be loopholes we can plug and improve or is it the result of omicron having the ability to penetrate any defence erected.”

Beijing’s testing blitz, along with measures including limiting mobility of those considered to have been exposed to the virus, “could be a very pivotal defense that has significant implication for the overall situation” Hu said.

Beijing appeared to order a wider shutdown of schools Thursday, with some suspending in-class teaching. Officials said Wednesday students and toddlers account for nearly one-third of the infections found in the city at the time. Some 20 million people will get tested three times this week as the capital races to uncover omicron’s spread in the sprawling capital.

Hangzhou, home to tech giant Alibaba Group Holding Ltd., has urged residents to get tested every 48 hours. The company’s offices continue to function normally, though employees have to confirm their health status daily, according to several workers, who asked not to be identified disclosing policy.

Hangzhou is also home to games maker NetEase Inc. and video-surveillance product company Hangzhou Hikvision Digital Technology Co. It’s also the base of Zhejiang Geely Holding Group Co., the carmaker owned by billionaire auto titan Li Shufu and Nongfu Spring Co., the bottled drinks company owned by China’s richest man Zhong Shanshan.

The port city of Qinhuangdao also announced a partial lockdown, sparking concerns about a further worsening of global supply chain snarls as local governments take swift measures to stifle Covid flareups.

Guangzhou Baiyun International Airport will alter some domestic passenger flights after abnormal Covid test results from some staff late Wednesday. At least three districts in Guangzhou started mass testing on Thursday.

(Adds impact on Alibaba in 12th paragraph. An earlier version of the story was corrected to remove references to a city that’s not currently under lockdown.)

Most Read from Bloomberg Businessweek

©2022 Bloomberg L.P.