The measure comes just weeks before the country hosts the Winter Olympics in Beijing.
Xi’an on Thursday reported 63 locally transmitted cases, pushing the city’s total to at least 211 over the past week. Xi’an is the capital of Shaanxi province, famed for its imperial relics, as well as a major center of industry.
“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 gave only her surname, Li.
“Including the guests, we are required to take a test once 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 earlier “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 required 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.
Download the NBC News app for breaking news and politics
One person from each household will be allowed out every two days to buy household necessities, a government order said. It took effect at midnight Wednesday, with no word on when it might be lifted.
There was no word on whether the virus was the newly surging omicron variant or the far more common delta. China has recorded just seven omicron cases — four in the southern manufacturing center of Guangzhou, two in the southern city of Changsha and one in the northern port of Tianjin.
China has also been dealing with a substantial outbreak in several cities in the eastern province of Zhejiang near Shanghai, although isolation measures there have been more narrowly targeted.
Authorities have adopted strict pandemic control measures under their policy of seeking to drive new transmissions to zero, leading to frequent lockdowns, universal masking and mass testing. While the policy has not been entirely successful while leading to massive disruptions in travel and trade, Beijing credits it with largely containing the spread of the virus.
The Xi’an restrictions are some of the harshest since China in 2020 imposed a strict lockdown on more than 11 million people in and around the central city of Wuhan, after the coronavirus was first detected there in late 2019.
China has reported 4,636 deaths among a total of 100,644 cases of Covid-19.