The police had warned Xie Yang, a human rights lawyer, not to go to Shanghai to visit the mother of a dissident. He went to the airport anyway.
His phone’s health code app — a digital pass indicating possible exposure to the coronavirus — was green, which meant he could travel. His home city, Changsha, had no Covid-19 cases, and he had not left in weeks.
Then his app turned red, flagging him as high risk. Airport security tried to put him in quarantine, but he resisted. Mr. Xie accused the authorities of meddling with his health code to bar him from traveling.
“The Chinese Communist Party has found the best model for controlling people,” he said in a telephone interview in December. This month, the police detained Mr. Xie, a government critic, accusing him of inciting subversion and provoking trouble.
The pandemic has given Xi Jinping, China’s top leader, a powerful case for deepening the Communist Party’s reach into the lives of 1.4 billion citizens, filling out his vision of the country as a model of secure order, in contrast to the “chaos of the West.” In the two years since officials isolated the city of Wuhan in the first lockdown of the pandemic, the Chinese government has honed its powers to track and corral people, backed by upgraded technology, armies of neighborhood workers and broad public support.
Emboldened by their successes in stamping out Covid, Chinese officials are turning their sharpened surveillance against other risks, including crime, pollution and “hostile” political forces. This amounts to a potent techno-authoritarian tool for Mr. Xi as he intensifies his campaigns against corruption and dissent.
The foundation of the controls is the health code. The local authorities, working with tech companies, generate a user’s profile based on location, travel history, test results and other health data. The code’s color — green, yellow or red — determines whether the holder is allowed into buildings or public spaces. Its use is enforced by legions of local officials with the power to quarantine residents or restrict their movements.
These controls are key to China’s goal of stamping out the virus entirely within its borders — a strategy on which the party has staked its credibility despite the emergence of highly contagious variants. After China’s initial missteps in letting the coronavirus spread, its “zero Covid” approach has helped keep infections low, while the death toll continues to grow in the United States and elsewhere. But Chinese officials have at times been severe, isolating young children from their parents or jailing people deemed to have broken containment rules.
City officials did not respond to questions about assertions by Mr. Xie, the lawyer. While it is hard to know what goes on in individual cases, the government itself has signaled it wants to use these technologies in other ways.
Officials have used pandemic health monitoring systems to flush out fugitives. Some fugitives have been tracked down by their health codes. Others who avoided the apps have found life so difficult that they have surrendered.
For all of its outward sophistication, though, China’s surveillance system remains labor intensive. And while the public has generally supported Beijing’s intrusions during the pandemic, privacy concerns are growing.
“China’s pandemic controls have really produced great results, because they can monitor down to every individual,” said Mei Haoyu, 24, an employee at a dental hospital in Hangzhou, a city in eastern China, who worked as a volunteer early in the pandemic.
“But if after the pandemic ends these means are still there for the government,” he added, “that’s a big risk for ordinary people.”
‘A vicious cycle arises’
A Covid cluster that rippled across Zhejiang Province in east China late last year began with a funeral. When one attendee, a health worker, tested positive in a routine test, 100 tracers sprang into action.
Within hours, officials alerted the authorities in Hangzhou, 45 miles away, that a potential carrier of the coronavirus was at large there: a man who had driven to the funeral days earlier. Government workers found and tested him — also positive.
Using digital health code records, teams of tracers plotted out a network of people to test based on where the man had been: a restaurant, a mahjong parlor, card-playing rooms. Within a couple of weeks, they stopped the chain of infections in Hangzhou — in all, 29 people there were found to be infected.
China’s capacity to trace outbreaks like this has relied heavily on the health code. Residents sign up for the system by submitting their personal information in one of a range of apps. The health code is essentially required, because without it, people cannot enter buildings, restaurants or even parks. Before the pandemic, China already had a vast ability to track people using location data from cellphones; now, that monitoring is far more expansive.
In recent months, the authorities in various cities have expanded their definition of close contact to include people whose cellphone signals were recorded within as much as half a mile of an infected person.
The party’s experiment in using data to control the flow of people has helped keep Covid at bay. Now these same tools potentially give officials greater power to manage other challenges.
Mr. Xi has praised Hangzhou’s “City Brain” center — which pulls together data on traffic, economic activity, hospital use and public complaints — as a model for how China can use technology to address social problems.
Since 2020, Hangzhou has also used video cameras on streets to check whether residents are wearing masks. One district monitored home power consumption to check whether residents were sticking to quarantine orders. The central city of Luoyang installed sensors on the doors of residents quarantining at home, in order to notify officials if they were opened.
With so much invested, financially and politically, in technological solutions, failures can have big repercussions.
During the recent lockdown in Xi’an, a city of 13 million in northwest China, the health code system crashed twice in two weeks, disrupting the lives of residents who had to update their apps each day with proof that they had taken Covid tests.
By focusing on technology and surveillance, Chinese officials may be neglecting other ways of protecting lives, such as expanding participation in public health programs, wrote Chen Yun, a scholar at Fudan University in Shanghai, in a recent assessment of China’s response to Covid.
The risk, Ms. Chen wrote, is that “a vicious cycle arises: People become increasingly marginalized, while technology and power increasingly penetrate everywhere.”
‘On call at all times’
For over a decade, the Communist Party has been shoring up its armies of grass-roots officials who carry out door-to-door surveillance. The party’s new digital apparatus has supercharged this older form of control.
China has mobilized 4.5 million so-called grid workers to fight the outbreak, according to state media — roughly one in every 250 adults. Under the grid management system, cities, villages and towns are divided into sections, sometimes of just a few blocks, which are then assigned to individual workers.
During normal times, their duties included pulling weeds, mediating disputes and keeping an eye on potential troublemakers.
Amid the pandemic, those duties mushroomed.
Workers were given the task of guarding residential complexes and recording the identities of all who entered. They called residents to make sure they had been tested and vaccinated, and helped those in lockdown take out their trash.
They also were given powerful new tools.
The central government has directed the police, as well as internet and telephone companies, to share information about residents’ travel history with community workers so that the workers can decide whether residents are considered high-risk.
In a county in southwestern Sichuan Province, the ranks of grid workers tripled to more than 300 over the course of the pandemic, said Pan Xiyu, 26, one of the new hires. Ms. Pan, who is responsible for about 2,000 residents, says she spends much of her time distributing leaflets and setting up loudspeakers to explain new measures and encourage vaccination.
The work can be exhausting. “I have to be on call at all times,” Ms. Pan said.
And the pressure to stifle outbreaks can make officials overzealous, prioritizing adherence to the rules no matter the cost.
During the lockdown of Xi’an, hospital workers refused medical care to a woman who was eight months pregnant because her Covid test result had expired hours earlier. She lost the baby, an episode that inspired widespread public fury. But some blamed the heavy burden placed upon low-level workers to stamp out infections.
The Coronavirus Pandemic: Key Things to Know
“In their view, it’s always preferable to go too far than be too soft-handed, but that’s the pressure created by the environment nowadays,” Li Naitang, a retired worker in Xi’an, said of local officials.
Still, for defenders of China’s stringent measures, the results are undeniable. The country has recorded only 3.3 coronavirus deaths per million residents, compared to about 2,600 per million in the United States. In mid-January, Xi’an officials announced zero new infections; this past week, the lockdown was lifted entirely.
‘You’ll never be lost’
The government’s success in limiting infections means its strategy has earned something that has proved elusive in many other countries: widespread support.
Ms. Pan, the grid worker, said her job was easier now than at the start of the pandemic. Then, residents often argued when told to scan their health codes or wear masks. Now, she said, people have come to accept the health measures.
“Everybody takes them more and more seriously, and is very cooperative,” she said.
Indeed, many Chinese fear that loosening controls could leave room for a resurgence of Covid, said Shen Maohua, a blogger in Shanghai who has written about the pandemic and privacy concerns under his pen name, Wei Zhou.
“For many people, I think, it’s actually a kind of mental trade-off,” he said in an interview. “They’re giving up some rights in return for absolute security.”
The question is how long people will continue to find that exchange worthwhile. Already, social media users have complained about the apparent arbitrariness with which they can find themselves blocked from traveling because of software glitches or policies that vary by city.
Even officials have acknowledged the problems. A state-run news outlet this month published an analysis of each province’s criteria for a health code to turn from green to yellow. It concluded that, for most provinces, the answer was unclear.
“You never know if your planned itinerary will be canceled, or if your travel plans can be realized,” the article said.
Some government critics warn that the costs will go far beyond inconvenience.
Wang Yu, a well-known human rights lawyer, says she believes the authorities have weaponized the health code to try to stop her from working. In November, as she was returning to Beijing after a work trip, she tried to log her travel on her health code app, as required. But when she selected Jiangsu Province, the drop-down menu listed only one city, Changzhou, where she had not been and which had just recorded several infections. If she chose that, she would most likely be refused entry to Beijing.
In the past, security officers had to physically follow her to interfere with her work. Now, she worries, they can restrict her movements from afar.
“Wherever you go, you’ll never be lost,” said Ms. Wang, who stayed with relatives in Tianjin until her app abruptly returned to normal a month later.
Less high-profile critics are vulnerable, too. Several local governments have pledged to keep a close eye on petitioners — people who travel to Beijing or other cities to lodge complaints about officials — because of their supposed potential to violate travel restrictions.
The health code “can also easily be used as a dirty trick for stability maintenance,” said Lin Yingqiang, a longtime petitioner from Fuzhou, in southeastern China. He said that he was taken off a train by the police ahead of a party leaders’ meeting in November. His health code app turned yellow, requiring that he return to Fuzhou for quarantine, though he had not been anywhere near a confirmed case.
Officials have openly promoted using virus control measures in ways unlinked to the pandemic. In the Guangxi region of southern China, a judge noticed that the grid workers’ accounting of local residents was “more thorough than the census.” That gave him an idea.
“Why not use this opportunity to have epidemic grid workers find people we couldn’t find before, or send summonses to places that were hard to reach before?” he said, according to a local news report. Eighteen summonses were successfully delivered as a result.
Local governments across China have sought to assure people that their health code data will not be abused. The central government has also issued regulations promising data privacy. But many Chinese people assume that the authorities can acquire whatever information they want, no matter the rules.
Zan Aizong, a former journalist in Hangzhou, says the expansion of surveillance could make it even easier for the authorities to break up dissenters’ activities. He has refused to use the health code, but it means moving around is difficult, and he finds it hard to explain his reasoning to workers at checkpoints.
“I can’t tell them the truth — that I’m resisting the health code over surveillance,” he said, “because if I mentioned resistance, they’d think that was ridiculous.”
Joy Dong, Liu Yi and Li You contributed reporting and research.