In modern stromatolites, mineralization results from a complex interplay between microbial metabolisms, the organic matrix, and environmental parameters. Here, we combined biogeochemical, mineralogical, and microscopic analyses with measurements of metabolic activity to characterize the mineralization processes and products in an emergent (<18 months) hypersaline microbial mat. While the nucleation of Mg silicates is ubiquitous in the mat, the initial formation of a Ca-Mg carbonate lamina depends on (i) the creation of a high-pH interface combined with a major change in properties of the exopolymeric substances at the interface of the oxygenic and anoxygenic photoautotrophic layers and (ii) the synergy between two major players of sulfur cycle, purple sulfur bacteria, and sulfate-reducing bacteria. The repetition of this process over time combined with upward growth of the mat is a possible pathway leading to the formation of a stromatolite.