There is evidence that individuals engage in herding behavior in diverse settings, ranging from fashion choices to financial markets. By examining the exogenous shock caused by the outbreak of COVID-19 and unique data measuring the footfalls in downtown Jonkoping, Sweden, we empirically assess how individuals respond to the restrictions imposed by the government and to the behavior of others, that is, herding. To this end, a regression discontinuity analysis with time as the running variable is applied. We find a negative effect of the restriction on footfalls, indicating that individuals follow the imposed governmental restrictions. However, we also find indications that individuals imitate the actions of others and engage in herd behavior even when the cost of doing so is very high; that is, it could result in severe illness or even death. With the use the unique setting of Sweden, where there have been no enforced lockdowns, we contribute with knowledge related to how effective voluntary restrictions are and the influence of others on one's decision making. Although the nature of the studied sample limits the external generalizability of the results, it may offer guidance for future interventions in clearly delineated settings.