Clusters of high-sulfidation epithermal deposits containing more than 50 Moz of gold are hosted by advanced argillic-altered Miocene volcanic rocks in the Yanacocha district, northern Peru (lat. 6°59'30 S, long. 78°30'45 W). We describe the nature of the volcanism and its relation to the gold ores on the basis of new district-scale geologic mapping, 69 40Ar/39Ar ages on igneous rocks and hydrothermal alunite, and petrologic and geochemical investigations. Volcanic rocks of the Calipuy Group are the oldest Cenozoic rocks at Yanacocha, and include the Huambo Cancha andesite, andesitic lahars of Tual and Chaupiloma (19.5–15.9 Ma), and the dacitic Cerro Fraile pyroclastics (15.5–15.1 Ma). The younger Yanacocha Volcanics (14.5–8.4 Ma) form a cogenetic series of lavas and pyroclastic rocks with a cumulative volume of ~88 km3 that represents eruption from a moderate-size volcanic center. Early pyroxene>hornblende-bearing lavas of the Atazaico Andesite (14.5–13.3 Ma) erupted from small stratovolcanoes progressively younger from southwest to northeast. Dacitic dikes followed that are spatially associated with gold deposits at Quilish and Cerro Negro (~7 Moz Au) and stage 1 alunite (13.6–12.6 Ma). The Colorado Pyroclastics erupted in the center of the district and include the hornblende- and biotite-bearing andesitic to dacitic Cori Coshpa (12.6 Ma) and Maqui Maqui (12.5–12.4 Ma) ignimbrites. The Colorado Pyroclastics are overlain by hornblende>pyroxene-bearing andesitic to dacitic lavas, flow-domes, and minor pyroclastic rocks of the Azufre Andesite (12.1–11.6 Ma). Widespread stage 2 alunite (11.5 Ma) and minor gold deposition (~0.5 Moz) closely follow. The San Jose Ignimbrite (11.5–11.2 Ma) overlies the Azufre Andesite and stage 2 alunite and includes three members of hornblende-pyroxene (biotite) dacite and andesite that erupted in the center of the district and flowed southward. Mineralogically similar domes were emplaced into the inferred vents. The Coriwachay Dacite (10.8–8.4 Ma) forms the youngest and most silica rich igneous rocks in the district, and includes intrusions and flow domes of dacite to rhyolite at Corimayo (10.8 Ma), Cerro Yanacocha (9.9 Ma), and Yanacocha Lake (8.4 Ma). Most of the gold (>47 Moz) was deposited at Yanacocha during intrusion of the late Coriwachay Dacite. These late dacites are volumetrically smallest (~2% of the total volume of erupted magma) and are temporally associated with stage 3 to 5 alunites. Stage 3 alunite (11.0–10.7 Ma) developed along a northeast trend for 9 km that includes the gold deposits of Corimayo, San Jose, Carachugo, and Maqui Maqui. The deeper Kupfertal Cu-Au porphyry has an age of 10.7 Ma on hydrothermal biotite and underlies zones of stage 4 and 5 quartz-alunite alternation that are 0.8 and 1.5 m.y. younger, respectively. Stage 4 alunite ranges in age from 10.2 to 10.3 Ma at the Tapado and Chaquicocha Sur gold deposits to Cerro Sugares east of the Maqui Maqui deposit. Stage 4 also includes a younger alunite age of 9.9 Ma from the San Jose gold deposit. Stage 5 alunite ranges from ~9.3 to ~8.2 Ma at Cerro Yanacocha, the largest gold deposit in the district. All these deposits contain massive and vuggy quartz, quartz-alunite, and quartz-pyrophyllite alteration associated with pyrite±enargite-tennantite-covellite. Magmatism in the Yanacocha district lasted for ~11 m.y. The Yanacocha Volcanics spanned the last ~6 m.y. of this period and were associated with long-lived magmatic-hydrothermal activity and episodic gold mineralization. The Yanacocha calc-alkaline suite was oxidized, water and sulfate rich, and evolved from early pyroxene>hornblende andesite to late titanite-bearing dacite and minor rhyolite. Several dacites contain populations of both high- and low-aluminum hornblendes that crystallized in the middle and upper crust, respectively. The variation of Mg, Ti, P, Sr, and Ba contents in these rocks is consistent with a complex magmatic origin via both cooling, fractional crystallization, periodic recharge of deeply derived hydrous basaltic or andesitic melts, and mixing with silicic melts derived by crustal melting. Low eruption rates, high phenocryst contents of the volcanic rocks, and widespread hydrothermal alteration are consistent with the hypothesis that most of the magmas at Yanacocha crystallized in shallow chambers as granitoids that passively degassed ore fluids. The compositional diversity of the volcanic rocks together with an extended magmatic-hydrothermal history reflect complex magmatic processes that were optimum for producing the world-class gold deposits at Yanacocha.