BEIJING (AP) — Authorities in southern China have apologized for breaking into the homes of people who had been taken to a quarantine hotel in the latest example of heavy-handed virus-prevention measures that have sparked a rare public backlash.

State media said that 84 homes in an apartment complex in Guangzhou city’s Liwan district had been opened in an effort to find any “close contacts” hiding inside and to disinfect the premises.

The doors were later sealed and new locks installed, the Global Times newspaper reported.

The Liwan district government apologized Monday for such “oversimplified and violent” behavior, the paper said. An investigation has been launched and “relevant people” will be severely punished, it said.

China’s leadership has maintained its hard-line “zero-COVID” policy despite the mounting economic costs and disruption to the lives of citizens, who continue to be subjected to routine testing and quarantines, even while the rest of the world has opened up to living with the disease.

Numerous cases of police and health workers breaking into homes around China in the name of anti-COVID-19 measures have been documented on social media. In some, doors have been broken down and residents threatened with punishment, even when they tested negative for the virus. Authorities have demanded keys to lock in residents of apartment buildings where cases have been detected, steel barriers erected to prevent them leaving their compounds and iron bars welded over doors.

China’s Communist leaders exert stringent control over the government, police and levers of social control. Most citizens are inured to a lack of privacy and restrictions on free speech and the right to assembly.

However, the strict anti-COVID-19 measures have tested that tolerance, particularly in Shanghai, where a ruthless and often chaotic lockdown spurred protests online and in person among those unable to access food, health care and basic necessities.

Authorities in Beijing have taken a gentler approach, concerned with prompting unrest in the capital ahead of a key party congress later this year at which president and party leader Xi Jinping is expected to receive a third five-year term amid radically slower economic growth and high unemployment among college graduates and migrant workers. A requirement that only vaccinated people could enter public spaces was swiftly canceled last week after city residents denounced it as having been announced without warning and unfair to those who have not had their shots.

“Zero-COVID” has been justified as necessary to avoid a wider outbreak among a population that has had relatively little exposure to the virus and less natural immunity. Although China’s vaccination rate hovers at around 90%, it is considerably lower among the elderly, while questions have been raised about the efficacy of China’s domestically produced vaccines.

Although China’s Fosun Pharma reached an agreement to distribute, and eventually manufacture, the mRNA vaccine made by Pfizer and BioNTech, it still has not been cleared for use in mainland China, despite being authorized for use by separate authorities in Hong Kong and Macao.

Studies have consistently shown that inoculation with mRNA vaccines offers the best protection against hospitalization and death from COVID-19. Chinese vaccines made with older technology proved fairly effective against the original strain of the virus, but much less so against more recent variants.

Now health experts say the delay in approving mRNA vaccines — a consequence of placing politics and national pride above public health — could lead to avoidable coronavirus deaths and deeper economic losses.

China’s national borders remain largely closed and although domestic tourism has picked up, travel around the country remains subject to an array of regulations, with quarantine restrictions constantly in flux.

In one recent incident, some 2,000 visitors to the southern tourist hub of Beihai have been forced to prolong their stays after more than 500 cases were found and they were barred from leaving.

The local government was struggling to find hotel rooms for those who had already prepared to return home, while hotels and airlines were providing refunds for those who had booked holidays to the city that had to be canceled.

China regulates travel and access to public places through a health code app on citizens’ smartphones that must be updated with regular testing. The app tracks a person’s movements as a form of contact tracing, allowing a further imposition of public monitoring.

The measures remain in place despite relatively low rates of infection. The National Health Commission on Tuesday announced just 699 new cases of domestic transmission detected over the previous 24 hours, the bulk of which were asymptomatic.