China is trying to stamp out a growing Covid-19 outbreak ahead of the Beijing Winter Olympics (AFP)
Residents of the Chinese capital were also advised not to leave the city unless necessary, although regular transport services out of the city continued as normal.
China reported 39 new cases on Monday, bringing the tally from the latest Delta variant-linked outbreak to more than 100 cases over the past week.
The numbers are extremely low compared with most other places in the world, but China has pursued a zero-case strategy throughout the pandemic and authorities are determined to stamp out the latest outbreak with the Winter Olympics just over 100 days away.
Several housing compounds in Beijing have been locked down, and organisers on Sunday indefinitely postponed a marathon at which 30,000 runners were expected.
Some 23,000 residents in a housing compound in Changping district have been ordered to stay indoors after nine cases were found on the premises in recent days, local outlet Beijing News reported.
Photos showed officials in hazmat suits standing watch outside the entrances to each apartment block, and the perimeter of the compound blocked by metal barricades.
At a Sunday press briefing, Xu Hejian, vice minister of Beijing's publicity department, advised people against large gatherings and "unnecessary" travel out of the capital.
Those entering the city from areas with Covid cases must show a negative test, officials said.
- Mass testing -
Health officials have warned that more infections may emerge as testing is ramped up in the coming days to fight the outbreak, which has been linked to a group of domestic tourists that travelled across China.
Authorities on Sunday suspended inter-provincial tour groups in five areas where cases have been detected, including Beijing.
In a sign of how seriously Beijing is taking the outbreak, police in the capital have launched three criminal investigations into alleged Covid safety breaches, the deputy director of the city's public security bureau said.
These included two infected people who initially concealed their symptoms, two residents escaping lockdown by climbing over a fence -- plus a pair of pharmacy managers who sold cough and fever medicine in breach of Covid requirements.
China requires registration for anyone buying cold or flu medicine in case they later turn out to have the virus.
Northern China has accounted for the majority of recent cases, with mass testing under way in eleven provinces.
A stay-at-home lockdown started Monday for around 35,000 people -- including tourists -- in Inner Mongolia region's Ejin county.
Some cities, including Gansu's provincial capital Lanzhou, and parts of Inner Mongolia have suspended bus and taxi services and closed tourist sites.
In the central city of Wuhan -- where the coronavirus was first identified in late 2019 -- organisers abruptly cancelled another marathon Sunday that was expected to draw 26,000 participants.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.