Beijing city officials on January 23 said all two million residents of a neighbourhood where a small cluster of coronavirus cases was detected will be tested, less than two weeks before the start of the Winter Olympics.
China's reported cases constitute a tiny fraction of the massive surge in countries around the globe, with the highly contagious Omicron variant driving a fresh spike in infections.
Local authorities have identified Fengtai district in southern Beijing as the epicentre of a cluster, with the number of reported cases in the capital totalling 43.
All two million of the area's residents were to be tested for the virus on January 23, officials said, and people from high-risk areas are banned from leaving the city.
"We must make every effort to stop the spread as quickly as possible by taking firm, strict and decisive measures," Beijing municipal government spokesman Xu Hejian said at a briefing.
Fengtai is about 20km from the Winter Olympics freestyle skiing and snowboarding venue.
With the Beijing Games starting on February 4, international delegates, media personnel, and some athletes have already begun arriving.
In an effort to thwart the coronavirus, China is sealing the Olympics inside a tightly controlled bubble cocooning thousands of people and stretching nearly 200km.
The testing announcement came days after China's postal service ordered workers to disinfect international deliveries after authorities claimed mail could be the source of recent coronavirus cases.
But the World Health Organisation has said the risk of being infected from contaminated surfaces is low.