What is the impact of a global health crisis on political behavior? We study the effect of the COVID-19 pandemic on electoral choice based on the case of Germany, one of the countries most heavily affected by the crisis. Our data come from the German state of Bavaria, where local elections were held right at the beginning of the pandemic. The elections took place early during the outbreak when there was still substantial variation in the extent to which individual counties and municipalities were affected by the outbreak. This variation provides a unique opportunity to study the causal impact of an event that would shortly after grow into an all-encompassing epidemic. We provide evidence that shows that the disease spread across the state in a mostly haphazard fashion. This lack of a discernible pattern coupled with within-county estimation of effects and a difference-in-differences strategy allow us to causally asses the effect of the spreading of the virus on electoral outcomes. Our results show that the crisis strongly and consistently benefited the dominant regional party, the CSU, and its candidates. For 3 known cases per 100,000 inhabitants, vote shares increased by about 4 percent. We explain our findings with a strategic-alignment mechanism, whereby voters vote into power candidates that they deem most likely to be able to solicit support from higher levels of government. Our findings emphasize the merit of forward-looking theories of voting and provide insights on the functioning of democracy during times of crisis.