The Aznalcollar mining district is located on the eastern edge of the Iberian Pyrite Belt (IPB) containing complex geologic features that may help to understand the geology and metallogeny of the whole IPB. The district includes several ore deposits with total reserves of up to 130 Mt of massive sulphides. Average grades are approximately 3.6% Zn, 2% Pb, 0.4% Cu and 65 ppm Ag. Mined Cu-rich stockwork mineralizations consist of 30 Mt with an average grade of 0.6% Cu. Outcropping lithologies in the Aznalcollar district include detrital and volcanic rocks of the three main stratigraphic units identified in the IPB: Phyllite-Quartzite Group (PQ), Volcano-Sedimentary Complex (VSC) and Culm Group. Two sequences can be distinguished within the VSC. The Southern sequence (SS) is mainly detritic and includes unusual features, such as basaltic pillow-lavas and shallow-water limestone levels, the latter located in its uppermost part. In contrast, the Aznalcollar-Los Frailes sequence (AFS) contains abundant volcanics, related to the two main felsic volcanic episodies in the IPB. These distinct stratigraphic features each show a different palaegeographic evolution during Upper Devonian and Lower Carboniferous. Massive sulphides occur in association with black shales overlying the first felsic volcanic package (VA1) Palynomorph data obtained from this black shale horizon indicate a Strunian age for massive sulphides, and consequently an Upper Devonian age for the VA1 cycle. Field and textural relationships of volcanics suggest an evolution from a subaerial pyroclastic environment (VA1) to hydroclastic subvolcanic conditions for the VA2. This evolution can be related to compartmentalizing and increasing depth of the sedimentary basin, which may also be inferred from changes in the associated sediments, including black shales and massive sulphides. Despite changes in the character of volcanism, the same dacitic to rhyolitic composition is found in both pyroclastic and subvolcanic igneous series. The main igneous process controlling chemical variation of volcanics is fractional crystallization of plagioclase (+accessories). This process took place in shallow, sub-surface reservoirs giving rise to a compositional range of rocks that covers the total variation range of felsic rocks in the IPB. The Hercynian orogeny produced a complex structural evolution with a major, ductile deformation phase (F1), and development of folds that evolved to thrusts by short flank lamination. These thrusts caused tectonic repetition of massive and stockwork orebodies. In Aznalcollar, some of the stockwork mineralization overthrusts massive sulphides. These structures are cut by large brittle overthrusts and by late wrench faults. The original geometric features of massive sulphide deposits correspond to large blankets with very variable thicknesses (10 to 100 m), systematically associated with stockworks. Footwall rock alteration exhibits a zonation, with an inner chloritic zone and a peripheral sericitic zone. Silicification, sulphidization and carbonatization processes also occur. Hydrothermal alteration is considered a multi-stage process, geochemically characterized by Fe, Mg and Co enrichment and intense leaching of alkalies and Ca. REE, Zr, Y and Hf are also mobilized in the inner chloritic zones. Three ore types occur, both in stockworks and massive sulphides, named pyritic, polymetallic and Cu-pyritic. Of these, Cu-pyritic is more common in stockworks, whereas polymetallic is prevalent in massive sulphides. Zoning of sulphide masses roughly sketches a typical VHMS pattern, but many alternating polymetallic and barren pyritic zones are probably related to tectonics. Although the paragenesis is complex, several successive mineral associations can be distinguished, namely: framboidal pyritic, high-temperature pyritic (300 °C), colloform pyritic, polymetallic and a late, Cu-rich high-temperature association (350 °C). Fluid inclusion data suggest that hydrothermal fluids changed continuously in temperature and salinity, both in time and space. Highest Th and salinities correspond to inner stockworks zones and later fluids. Statistic population analysis of fluid inclusion data points to three stages of hydrothermal activity, at low (<200 °C), intermediate (200–300 °C) and high temperatures (300–400 °C). 34S values in massive sulphides are lower than in stockwork mineralization suggesting a moderate bacterial activity, favoured by the euxinoid environment prevailing during black shale deposition. The intimate relation between massive sulphides and black shales points to an origin of massive sulphides by precipitation and replacement within black shale sediments. These would have acted both as physical and chemical barriers during sulphide deposition. Hydrothermal activity started during black shale deposition, triggered by a rise in thermal gradient due to the ascent of basic magmas. We suggest a three-stage genetic model: (1) low temperature, diffuse fluid flow, producing pyrite-bearing lenses and disseminations interbedded with black shales; locally, channelized high-T fluid flow occurs; (2) hydrothermal cyclic activity at a low to intermediate temperature, producing most of the pyritic and polymetallic ores, and (3) a late high-temperature phase, yielding Cu-rich and Bi-bearing mineralization, mainly in the stockwork zone.