Beijing sealed off 10 areas of its northeastern Shunyi district on Tuesday, the first lockdown in the Chinese capital since the last coronavirus outbreak in July.
The city has reported 16 infections and three asymptomatic cases since December 18, when the first cases were found.
Most of the cases were in Shunyi, which has banned couriers from entering residential compounds.
Six villages, three buildings and one industrial zone were among the areas locked down, a Beijing municipal official told a news conference.
While Beijing's new cases are modest in number compared with June and July, municipal authorities have beefed up steps to rein in the coronavirus, which has surfaced in three districts, where hundreds of thousands of residents have been tested.
"The capital's COVID prevention and control (efforts) need to initiate emergency mode," a city spokesman said at the news conference.
The Beijing government said it was cancelling large-scale gatherings such as temple fairs and sporting events, and controlling the size of offline events such as annual parties.
On Sunday, it said it would increase the number of carriages in the metro system to spread out commuters, and limit attendance at scenic spots and entertainment venues to 75 per cent of capacity.
Live music events have been cancelled and a New Year's Day light show called off. Educational institutions, from primary schools to the prestigious Tsinghua University have barred unnecessary entry of outsiders.
Students of primary schools and some from middle schools will also start winter holidays by up to two weeks earlier next month, a peak travel period before the Lunar New Year in mid-February.
Beijing has also urged residents to stay home during the holidays, with officials in its northern district of Yanqing turning on loudspeakers to advise residents not to travel outside the region.


Slow movement at Gaza border after Israel reopens Rafah crossing
US to cut tariffs on India to 18%, India agrees to end Russian oil purchases
Son of Norway's crown princess stands trial for assault and domestic violence
Israel reopens Gaza's Rafah border crossing to Egypt, with limits
US envoy Witkoff to visit Israel, meet Netanyahu, Israeli officials say
Russian drone strike kills 12 miners in Ukraine
Singapore to launch space agency in response to global investment surge
Five-year-old boy returns to Minnesota after ICE release
