Why do some countries make the costly decision to relocate their capital city? Existing research offers four general explanations for this momentous action: administrative functionality, economic development, environmental degradation, and national integration. We offer a less sanguine, political explanation: capital relocations offer autocratic leaders a way to mitigate different security threats, including coups, popular protests, and foreign interventions. Using original data on capital relocations in 202 polities after 1789, we test several implications of our argument, at different levels of analysis. First, we show that autocracies are much more likely to relocate their capitals than democracies. Second, using different indicators of internal and external threats, we find that autocracies more likely relocate their capitals when breakdown is looming. Third, running subnational analyses, we find evidence that capitals are relocated to smaller cities and areas less susceptible to urban development.