The San Rafael Sn (-Cu) deposit, located in the Eastern Cordillera of southeast Peru, is one of the world’s largest cassiterite-bearing vein systems (>1 Mt Sn produced since 1969). The deposit consists of a quartz-cassiterite-chlorite-sulfide lode system spatially associated with an upper Oligocene (ca. 24 Ma) S-type granitic pluton. Based on a revised paragenetic sequence for the deposit, we interpret the temporal setting of both magmatic (biotite, K-feldspar) and hydrothermal (muscovite, adularia, cassiterite) minerals analyzed by 40Ar/39Ar step-heating and U-Pb laser ablation-inductively coupled plasma-mass spectrometry (LA-ICP-MS) geochronology. The least-disturbed biotite sample from the megacrystic monzogranite yielded a 40Ar/39Ar plateau age of 24.10 ± 0.26 Ma (2σ), which constrains the time of cooling of the upper part of the pluton to below 300°C. Greisen developed on top of the granitic cupola and its immediate metamorphic aureole dated at 24.24 ± 0.24 Ma (2σ; 40Ar/39Ar muscovite average plateau age) is interpreted to be contemporaneous with the emplacement of pre-ore quartz-tourmaline veins and breccias. In situ U-Pb dating of cassiterite, including both botryoidal cassiterite (“wood tin”) and coarse-grained cassiterite in quartz-chlorite veins and breccias, constrains the timing of the main Sn ore stage to between 24.10 ± 0.37 and 23.47 ± 0.53 Ma (2σ). Botryoidal and coarse-grained cassiterite are characterized by similar trace element compositions with fluctuating metal concentrations across growth banding, suggesting significant changes of physicochemical conditions of the hydrothermal system during cassiterite precipitation, likely caused by rapid and repeated mixing between magmatic fluids and meteoric groundwaters. Polymetallic sulfide-rich veins and quartz-carbonate veins are constrained to have formed between 22.72 ± 0.11 and 22.29 ± 0.24 Ma (2σ), based on adularia 40Ar/39Ar plateau ages. The latter overlap partially reset 40Ar/39Ar age spectra for K-feldspar megacrysts in the host granite and thus reflect pervasive alteration by hydrothermal fluids. Collectively, the results show the magmatic-hydrothermal system spanned at least 2 m.y. with the main Sn ore stage representing <1 m.y. in the lifetime of the deposit. The latest polymetallic stages postdate the main Sn ore stage by ca. 1 m.y. and reflect the waning of the hydrothermal system, accompanied by additional incursion of meteoric groundwaters. This study provides further evidence that the present-day exposed level of the San Rafael granite was a passive host for the Sn mineralization and only provided the structural focusing for the mineralizing fluids derived from a deeper part of the magmatic system.