Facing mounting pressure, New York City officials announced on Sunday a sweeping shutdown of tens of thousands of bars and restaurants, and the closure of the city’s public school system — the largest in the nation — in an effort to suppress the spread of the coronavirus.

From California to Washington, D.C., governors and mayors are grappling with how far government should go in constricting people’s daily lives to keep them home.

A patchwork of recent measures — mandatory curfews in Puerto Rico and Hoboken, N.J.; the closing of restaurant and bar dining rooms in Ohio and Illinois; and the closure of public schools in several states, including Minnesota, South Carolina and Rhode Island — was a sign that the restrictive interventions could soon become the norm nationwide.

New York provided another stark example on Sunday: Shortly before 10 p.m., Mayor Bill de Blasio announced that the city will close its bars and restaurants, except for delivery and pickup services, leaving waiters, bartenders and baristas uncertain about their next paycheck.