Anyone who does not comply “shall be held accountable according to law,” according to a text of the order released by state television. The order was issued by a Communist Party “leading group” at the municipal level, not the national Communist Party.

It was the latest sign that China’s leaders were still struggling to set the right balance between restarting the economy and continuing to fight the coronavirus outbreak.

On Tuesday and Wednesday, the country’s top officials met and issued orders that included a mandate to help people to return to workplaces from their hometowns. Tens of millions had gone home to celebrate Lunar New Year holidays before the government acknowledged the seriousness of the epidemic. They have faced local government checkpoints on the way back to work and then lengthy quarantines upon their return to big cities.

But while national leaders may be worried that travel restrictions and quarantines may be preventing companies from finding enough workers to resume full production, that did not stop Beijing municipal leaders from further tightening controls on Friday evening in the city.

The policy may reduce the chances that people returning from the hinterlands could infect the country’s elite.