Chinese officials have pledged to alleviate food shortages in Xi’an for residents locked in their homes as the country battles its worst Covid-19 outbreak since the coronavirus pandemic started in Wuhan two years ago.

Residents of the central Chinese city of 13m complained on social media that their food stores were running low and of the difficulty buying supplies as shops have been shuttered and movement sharplyæurtailed.

In many parts of the city, residents are allowed to leave their homes only for mandatory Covid-19 testing and have to rely on patchy delivery services to restock.

“The stores here aren’t open, if they were open we still can’t go downstairs,” one Xi’an resident wrote on Weibo, the social media platform.

“All we can do is add the shop owners’ WeChats and sneak out at night. Buying food is like being a thief,” the person added.

A video of the city’s pandemic prevention workers beating a resident for leaving his apartment to buy food went viral on social media last week. The clip showed a half dozen steamed buns spilling from the man’s bag as workers shoved him.

City police on Saturday said they had detained the two workers who attacked the man and fined each Rmb200 ($31). Another resident complained of paying Rmb150 for a bag of vegetables while others said they had problems obtaining medicines and other essentials.

Doubts over the efficacy of Chinese vaccines stoke anxiety at home and abroad

“For next steps, we’re going to continue to strengthen the quality, price and supply of goods for people, and increase our caring and support for special groups,” said Lin Jianwen, a top city official.