We study changes in social distancing and government policy in response to local outbreaks during the COVID-19 pandemic. Using aggregated county-level data from approximately 20 million smartphones in the United States, we show that social distancing behaviors have responded to local outbreaks: a 1% increase in new cases (deaths) is associated with a 3% (11%) increase in social distancing intensity. Responsiveness is reinforced by the presence of public measures restricting movements, but remains significant in their absence. Responsiveness is higher in high-income, more educated, or Democrat-leaning counties, and in counties with low health insurance coverage. By contrast, social capital and vulnerability to infection are strongly associated with more social distancing but not with more responsiveness. Our results point to the importance of politics, trust and reciprocity for compliance with social distancing, while material constraints are more critical for being responsive to new risks such as the emergence of variants.