PurposeThis paper aims to analyze the dynamics of the Spanish public debt–gross domestic product ratio during the period 1850–2020.Design/methodology/approachThis study uses a recent procedure to test for recurrent explosive behavior (Phillipset al., 2011; Phillipset al., 2015a, 2015b) to identify episodes of explosive public debt dynamics and also the episodes of fiscal adjustments over this long period.FindingsThe identified episodes of explosive behavior of public debt coincided with fiscal stress events, whereas fiscal adjustments and changes in economic policies stabilized public finances after periods of explosive dynamics of public debt.Originality/valueThe longer than usual span of the data should allow the authors to obtain some more robust results than in most of previous analyses of long-run sustainability.