To contain the spread of the COVID-19 pandemic, many countries around the globe have adopted social distancing measures. Yet, establishing the causal effect of non-pharmaceutical interventions (NPIs) is difficult because they do not occur arbitrarily. We exploit a quasi-random source of variation for identification purposes -namely, regional differences in the placement on the pandemic curve following an unexpected and nationwide lockdown. Our results reveal that regions where the outbreak had just started when the lockdown was implemented had 1.62 fewer daily deaths per 100,000 inhabitants when compared to regions for which the lockdown arrived 10+ days after the pandemic's outbreak. As a result, a total of 4,642 total deaths (232 deaths/daily) could have been avoided by the end of our period of study -a figure representing 23% of registered deaths in Spain at the time. We rule out differential pre-COVID mortality trends and self-distancing behaviors across the compared regions prior to the swift lockdown, which was also uniformly observed nationwide. In addition, we provide supporting evidence for contagion deceleration as the main mechanism behind the effectiveness of the early adoption of NPIs in lowering the death rate, rather than an increased healthcare capacity.