In mid-February, a 38-year-old man in Codogno, a small town just outside Milan, became the first known person to be infected with the new coronavirus in Italy.

The reaction by local authorities was swift. The roughly 50,000 people who live in Codogno and nearby towns were told to only leave their homes if absolutely necessary, and the area was sealed off from the rest of Italy.

Now,...