We identified molybdenite (MoS2) as an accessory magmatic phase in 13 out of 27 felsic magma systems examined worldwide. The molybdenite occurs as small (<20 ??m) triangular or hexagonal platelets included in quartz phenocrysts. Laser-ablation inductively coupled plasma mass spectrometry analyses of melt inclusions in molybdenite-saturated samples reveal 1-13 ppm Mo in the melt and geochemical signatures that imply a strong link to continental rift basalt-rhyolite associations. In contrast, arc-associated rhyolites are rarely molybdenite-saturated, despite similar Mo concentrations. This systematic dependence on tectonic setting seems to reflect the higher oxidation state of arc magmas compared with within-plate magmas. A thermodynamic model devised to investigate the effects of T, f O2 and f S2 on molybdenite solubility reliably predicts measured Mo concentrations in molybdenite-saturated samples if the magmas are assumed to have been saturated also in pyrrhotite. Whereas pyrrhotite microphenocrysts have been observed in some of these samples, they have not been observed from other molybdenite-bearing magmas. Based on the strong influence of f S2 on molybdenite solubility we calculate that also these latter magmas must have been at (or very close to) pyrrhotite saturation. In this case the Mo concentration of molybdenite-saturated melts can be used to constrain both magmatic f O2 and f S2 if temperature is known independently (e.g. by zircon saturation thermometry). Our model thus permits evaluation of magmatic f S2, which is an important variable but is difficult to estimate otherwise, particularly in slowly cooled rocks. ?? The Author 2011. Published by Oxford University Press. All rights reserved.