The Beijing government said Saturday that it has detected its first case of the Omicron variant of the coronavirus, just weeks ahead of the Winter Olympics in the capital.

In recent months, community infections with the highly contagious variant were confirmed in Tianjin with a population of 14 million, known as a key gateway to Beijing.

Supplied photo taken Jan. 15, 2022, shows the entrance of a residential district locked down after confirmation of the first case of the Omicron variant of the coronavirus in Beijing. (CNS/Kyodo)

The number of infections in China has been increasing in the run-up to the Olympics slated to start Feb. 4 despite the ruling Communist Party's radical "zero corona" policy, including locking down major cities and suspending all public transportation.

In Xian, more than 2,000 people have been infected with the virus for around one month since early December and municipal authorities have locked down the city of 13 million since the middle of the month.

The Beijing government, meanwhile, has called on residents not to move out of the capital unless necessary since late October when COVID-19 cases rose in the city after a weeklong national holiday early in the month.

In addition, people in regions with new infections identified have been prohibited from entering Beijing, while visitors to the capital have been compelled to have a negative certificate of a PCR test taken within 48 hours.