The Chinese city of Tianjin, known as a major gateway to Beijing, has begun citywide COVID-19 nucleic acid testing, state-run media reported Monday, just weeks before the Winter Olympics in the capital.

The stepped-up anti-epidemic measure was prompted by the confirmation Saturday of two community infections with the highly contagious Omicron variant in the city of 1.4 million people.

People stand in queues to receive COVID-19 nucleic acid tests on Jan. 9, 2022 in Tianjin, China. (VCG/Getty/Kyodo)

If residents do not get tested within a specified time, their "health code" on a smartphone will turn to orange from green, the media said, meaning they would be prohibited from boarding trains and buses as well as entering shopping malls and office buildings.

The Global Times, a tabloid of the ruling Chinese Communist Party, quoted a senior official in Tianjin as telling reporters on Sunday that the city will make every effort to fulfill its responsibility as a "moat" for Beijing.

Commuters between Beijing and Tianjin have been advised by the authorities to work from home and people in the capital have been asked not to go to the neighboring city unless necessary, according to the official Xinhua News Agency.

Mainland China recorded 97 new locally transmitted COVID-19 cases on Sunday, including 21 in Tianjin, the country's National Health Commission said Monday.

In China, the government has been stepping up its radical "zero corona" policy in the run-up to the Beijing Winter Olympics, slated to start Feb. 4.

Many Chinese citizens have apparently been frustrated by strong restrictions in place since the virus -- first detected in the central Chinese city of Wuhan in late 2019 -- began to spread in the nation.

Xi'an, another central Chinese city, has been locked down since late December amid a renewed virus spread. Anti-virus restrictions are said to have played a role in a case where the municipal government failed to provide medical treatment to a pregnant woman and she lost her unborn baby.

The woman was in labor but reportedly denied entry at a hospital because her negative PCR test result had expired four hours earlier. A city official apologized to her last week.

Related coverage:

Pandemic fears grow 1 month ahead of Beijing Olympics, upset China

Xi vows to make Beijing Olympics success despite diplomatic boycott

China satirizes U.S. applying for officials' visas for Beijing Games