This paper investigates the effect of the lockdown on COVID-19 infections. After the 22nd of March 2020, the Italian government shut down many economic activities to limit the contagion. Sectors deemed essentials for the economy were, however, allowed to remain active. We exploit the distribution of the density of essential workers across provinces and rich administrative data in a difference in difference framework. We find that a standard deviation increase in essential workers per square kilometre leads to an additional daily registered case per 100,000 inhabitants. This is a sizeable impact, and it represents about 18% of the daily increase in COVID-19 cases after the 22nd of March. Back of envelope computations suggest that the about one third of the cases considered could be attributed to the less stringent lockdown for essential sectors, with an additional 107 million Euros in direct expenditure. Although this assessment should be taken with caution, this suggests that the less stringent lockdown came at moderate public health related economic costs. In addition, we find that these effects are heterogeneous across sectors, with services having a much larger impact than Manufacturing, while there are only small differences across geographic areas. These results are stable across a wide range of specifications and robustness check.