Stromatolites are laminated, lithified (CaCO3) sedimentary deposits formed by precipitation and/or sediment accretion by cyanobacterial–bacterial mat communities. Stromatolites have been associated with these communities as far back as the Precambrian era some 2+ billion years ago. The means by which microbial communities mediate the precipitation processes have remained unclear, and are the subject of considerable debate and speculation. Two alternative explanations for microbially mediated precipitation include: (i) cyanobacterial photosynthesis increases pH in a system supersaturated in respect of CaCO3, resulting in CaCO3 precipitation and then laminated lithification, and (ii) decomposition of cyanobacterial extracellular organic matter (e.g. sheaths, mucilage and organic acids) by microheterotrophs leads to release of organic-bound Ca2+ ions and CaCO3 precipitation. We evaluated these explanations by examining metabolically active, lithifying stromatolitic mat communities from Highborne Cay, Bahamas, using microautoradiography. Microautoradiographic detection of 14CO2 fixation and 3H organic matter ( d-glucose and an amino acid mixture) utilization by photosynthetically active cyanobacteria and microheterotrophs, combined with community-level uptake experiments, indicate that bacteria, rather than cyanobacteria are the dominant sites of CaCO3 deposition. In the oligotrophic waters in which stromatolites exist, microheterotrophs are reliant on the photosynthetic community as a main source of organic matter. Therefore, autotrophic production indirectly controls microbially mediated precipitation and stromatolite formation in these shallow marine environments.