This paper assesses the dynamic impact of global macroeconomic conditions, commodity price movements, shifts in portfolio preferences, and domestic shocks on fiscal outcomes—notably the budget deficit, its main components, and debt—across a wide range of countries. Heterogeneity is investigated across the level of development and other structural characteristics. Dynamics are explored via panel local projections, while robustness is assessed via dynamic panel and system GMM regressions. World growth, financial risk appetite, political events, and commodity export prices are key determinants of fiscal outcomes in EM, while domestic growth, commodity import prices, and banking crises appear to matter more in AE. Our estimates help quantify the amount of fiscal risk generated by various factors, and thus provide inputs for the design of potential insurance mechanisms or state-contingent debt instruments that could assist in smoothing fiscal fluctuations.