Over the past two years, China has used some of the strictest measures anywhere to keep Covid-19 out and long succeeded in holding numbers down. But as Omicron poses the biggest challenge since the start of the pandemic, the country is looking more boxed in by its own formula.

Beijing has repeatedly pointed to Western countries where the virus has run rampant as cautionary examples. But as the Omicron variant spreads inside China ahead of February’s 2022 Beijing Winter Olympics, an uncomfortable reality is setting in: The country’s ability to keep the virus at bay has meant low levels of natural immunity. Vaccination rates are high, but how effective Chinese vaccines are against Omicron remains in question.

China has held fast to its “zero-Covid” strategy despite a mounting toll on its people and economy, and as other countries have moved away from lockdowns. The highly contagious Omicron variant will be harder to manage, health experts say, likely leading to more frequent and longer-lasting restrictions.

“Covid-zero is great when you’re at zero, but when you’re not, it can become very disruptive to the community,” said Ben Cowling, chair professor of epidemiology at the University of Hong Kong’s School of Public Health.

Central-government authorities show no intention of changing their approach to Covid-19, which they continue to see as a success amid the Omicron surge, according to officials familiar with the government’s thinking. Beijing is concerned that any relaxation in controls could lead to a big breakout of coronavirus cases, given the relatively low efficacy of Chinese vaccines and remaining pockets of unvaccinated people in the countryside, some of the officials said.

“An outbreak would put a huge strain on the country’s resources,” said one of the officials, referring to China’s limited healthcare facilities, especially in rural areas.

On Sunday, authorities in Tianjin—a port city a half-hour from Beijing by high-speed train—said they had found two locally transmitted Omicron infections. A day later, two people some 300 miles away in Henan province were linked to the same transmission chain.

The discoveries kicked off a now-familiar choreography: lockdown, mass testing and warnings of further restrictions to come.

suspended train and bus service to Beijing and on Wednesday embarked on a second round of testing everyone in the city of 14 million. Henan has closed most schools and banned public gatherings, including temple fairs and other celebrations ahead of the Lunar New Year. Several local governments in the province of 99 million have issued stay-at-home orders.

Under President Xi Jinping, China has veered toward a more top-down approach to any issue, and local officials, fearful they might be punished if they let Covid-19 gain a foothold, tend to err on the side of aggressive interpretation of the central government’s policy instructions.

The strains the resulting measures are putting on communities throughout China were on display in the city of Xi’an, whose 13 million people have been ordered to stay in their homes for almost three weeks. Some complained of a lack of access to food. The account of a woman losing her unborn baby after waiting outside a hospital for hours for lack of a valid Covid-19 test sparked a wave of anger online in response to the harsh measures.

Two other Xi’an women told similar stories online, while others said family members with chest pain had faced deadly delays, incidents that seemed to mark a turning point in the public’s patience with inflexible zero-Covid policies. The confusion around access to healthcare prompted a rare and direct public admission of wrongdoing. At a news conference, Liu Shunzhi, head of Xi’an’s health commission, bowed in apology to residents. “We feel deeply sorry,” he said.

Xi’an’s lockdown is one of the biggest since the sealing off of Wuhan in early 2020, and one of many carried out across China since the start of the pandemic. Ruili, a town of about 200,000 on China’s border with Myanmar, has endured at least four lockdowns in a little more than a year, with residents spending months at a time in isolation. In October, more than 30,000 visitors were locked in Shanghai Disneyland and forced to undergo Covid-19 testing after one visitor tested positive.