The majority of hydrothermal vein systems of economic interest occur at relatively shallow crustal levels, although many of them formed at significantly greater depths. Their present position is a consequence of uplift and erosion. Although, many aspects of their formation are well constrained, the temporal chemical evolution of such systems during uplift and erosion is still poorly understood. These vein minerals comprise calcite, dolomite-ankerite, siderite-magnesite, anhydrite and gypsum forming the last gangue assemblages in Jurassic and Tertiary sulphide-fluorite-quartz-barite veins of the Schwarzwald mining district, SW Germany. Mineral textures of samples from nine localities reveal that in these sequences, mineral precipitation follows a recurring pattern: early calcite is followed by anhydrite or gypsum, siderite and/or dolomite. This succession may repeat up to three times. In-situ (LA-ICP-MS) U-Pb age dating of 15 carbonates from three subsequent generations of the late-stage vein assemblage yield robust ages between 20 and 0.6 Ma. Each mineral sequence forms in a distinctive period of about 2-5 Ma. These ages clearly relate these late-stage mineral phases to the youngest geological episode of the Schwarzwald, which is associated with the Cenozoic Rhine Graben rifting and basement uplift. Based on thermodynamic modelling, the formation of the observed mineral assemblages required an deeply sourced Mg-, Fe-and SO4-rich fluid (b), which was episodically mixed with a shallow crustal HCO3-rich fluid (a). As a consequence of fluid mixing, concentrations of Mg, Fe and SO4 temporarily increased and initiated the formation of the observed sulphate-carbonate mineral sequences. This discontinuous large-scale vertical fluid mixing was presumably directly related to episodes of active tectonics associated with the Cenozoic strike-slip regime of the Upper Rhine Graben. Analogously, episodic fluid mixing is a major key in the formation of older (Jurassic to early Tertiary) Pb-Zn-fluorite-quartz-barite assemblages in the same specific vein systems, albeit involving different fluid compositions. Late-stage hydrothermal (similar to 20-70 degrees C) vein assemblages reported in this study record the transition from deep (>2 km) to very shallow (0-1 km) crustal conditions. As a consequence of successive uplift, increasing proportions of shallower and cooler (similar to 50-70 degrees C) fluids could take part in such mixing processes. Associated changes in the fluid composition caused the vein mineralogy to change from sulphide-quartz-fluorite-barite to calcite-anhydrite/gypsum-siderite-dolomite, as the system passively ascended closer to the surface. (C) 2017 Elsevier Ltd. All rights reserved.