The San Rafael tin-copper deposit in the Eastern Cordillera of the Peruvian Central Andes is the world’s largest hydrothermal tin lode, with a total resource of about 1 million metric tons metal, at an average grade of 4.7 wt percent Sn. The mineralization is of the cassiterite-sulfide type and occurs in a vertically extensive vein-breccia system centered on a shallow-level, late Oligocene granitoid stock. The tin ores form cassiterite-quartz-chlorite–bearing veins and breccias hosted by several large fault-jogs at depth in the lode. By contrast, the copper ores, which contain disseminated acicular cassiterite, are localized in the upper part of the system. Both ore types are associated with a very distinctive, strong chloritic alteration, which was preceded by intense sericitization, tourmalinization, and tourmaline veining. The δ34S values of the sulfides range between 2 and 6 per mil, and vary very little with location in the deposit. This indicates that the hydrothermal system was large, with a relatively homogeneous source of sulfur, likely of magmatic origin. This is confirmed by stability relationships of ore minerals, which indicate that the ore fluids were initially reducing. Microthermometric studies of fluid inclusions in cassiterite, quartz, tourmaline, and fluorite show that the fluids responsible for the early, barren stage were hot, hypersaline brines (380°–540°C, 34–62% NaCl equiv), whereas the ore-stage fluids had moderate to low salinity (0–21 wt % NaCl equiv), and were of moderate temperature (290°–380°C). In addition to the marked dilution of the ore fluids with evolution of the hydrothermal system, they became progressively more oxidizing, as inferred by the local association of minor hematite with cassiterite and the ubiquitous replacement of pyrrhotite by pyrite and marcasite. The δ18O values of the fluid decreased systematically with time, as indicated by the δ18O values of different generations of tourmaline, cassiterite, and quartz. This evolution was paralleled by an increase in the δD values of the fluid, inferred from the δD values of tourmaline and chlorite. This trend is consistent with mixing of the ore fluids with a cooler fluid that had substantially lower δ18O, and cannot be explained by fluid boiling. Based on structural evidence for an opening of the vein system and a transition from lithostatic to hydrostatic conditions at the onset of mineralization, we infer that ore deposition was caused by an influx of hot groundwater of meteoric origin which mixed repeatedly with tin-bearing magmatic brines. The oxidation, dilution, cooling, and acid neutralization of the ore fluids destabilized chloride complexes of tin and triggered the large-scale precipitation of cassiterite.