States often engage in internal purges to eliminate political dissidents within their own ranks. However, partly because of the absence of reliable data, we know little about the logic and dynamics of these purges, particularly of lower-rank members of the state. Why do state authorities persecute these individuals when they do not entail a clear threat to the regime? We focus on the purges of public-school teachers during the early years of Francisco Franco’s regime in Spain. Using detailed historical sources, we explore whether teachers were more likely to be purged following the two main cleavages in 1930s Spain: the left-right divide and the center-periphery (i.e. nationalist) cleavage. Our results suggest that whilst the Spanish Civil War (1936-1939) was still unfolding Francoist authorities targeted teachers from leftist localities, thus focusing on potential security threats behind the frontlines. After winning the war, Francoists switched their targeting to teachers from national minority groups in order to promote nation-building policies leading to their assimilation. Our findings highlight the double logic of purging as both a preemptive measure against internal threats and a nation-building tool.