The restrictions in the northeastern city of Xi’an took effect at midnight Wednesday, with no word on when they might be lifted. They are some of the harshest since China imposed a strict lockdown last year on more than 11 million people in and around the city of Wuhan, where the coronavirus was first detected in late 2019.

One person from each household will be allowed out every two days to buy household necessities, a government order said. Other family members were required to stay at home, although the rule was not being rigorously enforced, according to social media posts. People who happened to be staying in hotels became stuck.

There was no word on whether the new cases were of the recently identified omicron variant that appears more contagious and is driving surges in many parts of the world — or the previous version, delta. China has reported just seven omicron cases so far, but none in Xi’an.

Though the latest outbreak is 1,000 kilometers (about 620 miles) southwest of the Olympic host city of Beijing, any sign that the pandemic might be worsening in China will raise questions about whether and how it will manage to welcome thousands of athletes, officials and journalists when the Games open in just weeks on Feb. 4.

On the one hand, there is a tremendous amount of national pride and investment riding on the Olympics and few would want a cancellation, postponement or dramatic reimagining at this late stage. On the other, Chinese authorities have adopted draconian measures throughout the pandemic under their policy of seeking to stamp out every last case — and it’s hard to see how welcoming so many people from abroad will square with that strategy.

That “zero tolerance” policy, which has led to frequent lockdowns, universal masking and mass testing, has not been entirely successful. It has resulted in massive disruptions to travel and trade, but Beijing credits it with largely containing the spread of the virus. Overall, China has reported 4,636 deaths and 100,644 cases of COVID-19.

Xi’an — the capital of Shaanxi province, famed for its imperial relics, as well as a major center of industry — reported another 63 locally transmitted cases on Thursday, pushing the city’s total to at least 211 over the past week.

China has also been dealing with a substantial coronavirus outbreak in several cities in the eastern province of Zhejiang near Shanghai, although isolation measures there have been more narrowly targeted.

“We are not receiving any new guests, and no present guests are allowed to leave the hotel,” said a receptionist at the Hanting Hotel in Xi’an, who only gave her surname, Li.

Staff and guests are required to be tested every two days, Li said. “There will be an impact on our business, and we have no idea how long it will last.”

The owner of a local bookshop said he had closed 10 days before, “fearing the worsening of the epidemic situation.”

“I am now staying at home watching television.” said the owner, who gave only his surname, Xiao.

Movement outside his compound requires permission from the local neighborhood committee, he said. “I think the situation will get better eventually, and I don’t worry at all because we have the government behind us,” Xiao said.