Does social distancing harm innovation? We estimate the effect of non-pharmaceutical interventions (NPIs)—policies that restrict interactions in an attempt to slow the spread of disease—on local invention. We construct a panel of issued patents and NPIs adopted by 50 large US cities during the 1918 flu pandemic. Difference-in-differences estimates show that cities adopting longer NPIs did not experience a decline in patenting during the pandemic relative to short-NPI cities, and recorded higher patenting afterward. Rather than reduce local invention by restricting localized knowledge spillovers, NPIs adopted during the pandemic may have preserved other inventive factors.