Bathonian algal limestones from the Duntulm Formation of the Great Estuarine Group, western Scotland, are subdivided into three microfacies: cryptalgal laminites, thrombolites and porostromate-micrites. The distribution of early diagenetic, carbonate spherulites and cement fringes is fabric selective. Spherulites are common in the thrombolitic microfacies, whereas cement fringes were best developed upon algal nodules with porostromate microstructure. Syndiagenetic micrites, spherulites and cement fringes have stable carbon isotopic ratios indicative of abundant, organic-derived HCO3 incorporation (δ13C values of −0·05 to −15‰). Enhanced magnesium concentrations in these fabrics, relative to neomorphic and burial-diagenetic spar cements, suggest an original Mg-calcite mineralogy, probably with precipitation under the influence of microbial systems. Brecciated, early-diagenetic fabrics and localized pockets of calcite pseudomorphs after gypsum were probably formed during subaerial exposure. Sulphate supply was probably from storm-derived, saline lagoon-water washed on to supralittoral stromatolitic flats. These inundations also allowed the temporary establishment of green algae and encrusting foraminifera. The combined geological and geochemical information suggests a palaeoenvironment somewhat similar to Recent, sub-tropical humid zone, calcareous algal marshes.