Magmaticanhydritefromandesitesanddacitesoccursasinclusionsinhigh-andlow-aluminum amphibole and pyroxene and indicates that sulfate-saturated magmas spanned a period of six million years at Yanacocha, Peru. Magmatic anhydrite from Yanacocha and other sites is characterized by light rare earth element–enriched patterns and elevated strontium contents distinct from magmatic-hydrothermal anhydrite. Petrologic arguments suggest that the hydrous and oxidized Yanacocha magmas contained more than ~1000 ppm sulfur both dissolved in the melt and as a separate sulfate phase, which is sufficient to provide all the sulfur for the genetically related giant sulfur-rich Yanacocha epithermal gold deposits. High-aluminum amphiboles contain unusual anhydrite with wormy and amoeboidal textures, which are tentatively interpreted to represent trapping of an immiscible CaSO4-water melt together with sulfur-rich apatite at a temperature of ~950 °C and a water pressure >3 kbar. Such unusually sulfate-rich magmas may be required to produce sulfur-rich magmatic-hydrothermal mineral deposits.