The Tinto River (Huelva, southwestern Spain) is an extreme environment with a constant acidic pH (mean 2.3), a high concentration of heavy metals and a remarkable level of microbial diversity (bacteria, archaea, photosynthetic and heterotrophic protists, yeast and filamentous fungi). The extreme conditions found in the river are the direct consequence of the active metabolism of chemolithotrophic microorganisms thriving in the rich polymetallic sulfides present in high concentrations in the Iberian Pyritic Belt. Primary production in the river is driven mainly by oxygenic photosynthesis (protists and cyanobacteria), although an important part is also due to the activity of chemolithotrophic prokaryotes. Conventional and molecular ecology techniques were used to study the microbial ecology of the Tinto system. The results of both methods agreed. Although sulfur metabolism plays an important role in the system, iron seems to be the key element in this habitat. Iron is not only an important substrate for the rich population of iron oxidizing prokaryotes, but also an electron acceptor for anaerobic respiration in the anoxic parts of the river. It is also responsible for the maintenance of a constant acidic pH (probably critical for biodiversity) and for radiation protection. Laminar iron stromatolitic formations can be found along the river. These structures are related to massive laminated bioinduced iron formations found at different elevations above the current river. The isotopic dating of these formations leads to the conclusion that the Tinto River corresponds to a natural system and not to an industrial, contaminated site. A geomicrobiological model of this habitat encompassing most of the geological, physical, chemical and biological variables is presented and its biohydrometallurgical implications discussed.