Acknowledgements: We thank the Icelandic Ministry of Environment, Energy and Climate (Umhverfis-, orku- og loftslagsráðuneytið; URN) for funding the volcano monitoring efforts at Fagradalsfjall, and Prof. Evgenia Ilyinskaya (University of Leeds) for acquiring the FTIR spectrometer used in this study. We thank Sveinbjörn Steinþórsson for providing help with the eruption monitoring efforts at the University of Iceland and the Department of Civil Protection (Almannavarnir) for providing help and access to the eruption site. S.W.S. thanks Prof. Eva Eibl (University of Potsdam) for stimulating discussions and insight into the physical mechanisms driving intermittent lava fountaining at Fagradalsfjall.AbstractLava fountains are a common manifestation of basaltic volcanism. While magma degassing plays a clear key role in their generation, the controls on their duration and intermittency are only partially understood, not least due to the challenges of measuring the most abundant gases, H2O and CO2. The 2021 Fagradalsfjall eruption in Iceland included a six-week episode of uncommonly periodic lava fountaining, featuring ~ 100–400 m high fountains lasting a few minutes followed by repose intervals of comparable duration. Exceptional conditions on 5 May 2021 permitted close-range (~300 m), highly time-resolved (every ~ 2 s) spectroscopic measurement of emitted gases during 16 fountain-repose cycles. The observed proportions of major and minor gas molecular species (including H2O, CO2, SO2, HCl, HF and CO) reveal a stage of CO2 degassing in the upper crust during magma ascent, followed by further gas-liquid separation at very shallow depths (~100 m). We explain the pulsatory lava fountaining as the result of pressure cycles within a shallow magma-filled cavity. The degassing at Fagradalsfjall and our explanatory model throw light on the wide spectrum of terrestrial lava fountaining and the subsurface cavities associated with basaltic vents.</jats:p