The combined analysis of the sedimentary structures, internal depositional geometries, and microfacies of uppermost Tortonian/lowermost Messinian shallow-marine carbonates (Agua Amarga Basin, southern Spain) has aided in unraveling the geological record of a highly dynamic ramp environment. The biogenic BRYOMOL association with large benthic foraminifers inhabited a warm, temperate climate (17-20 degrees C). Sediment distribution was governed by physical parameters, and redistribution and mixing of particles blurred original biogenic zonations. Thus, although the carbonate factory can be localized on the mid ramp based upon sedimentary structures and depositional textures, sediment composition is quite uniform over the depositional profile, and only qualitative paleontological evidence exists for the original presence of seagrass patches (benthic foraminifers, biomuration fabrics in bryozoans). Originally aragonitic biota (i.e., molluscs), quantitatively important in all Cenozoic shallow-marine environments, were dissolved during or soon after deposition and left no significant trace in the fossil record. Consequently, the diagenetic potential of the sediments was low, and the deposits remained essentially unlithified for a long period. During lowstands and transgressions, particles were partly reworked from previously deposited material. Sediment compositions within these units are increasingly biased toward concentrations of mechanically more resistant carbonate grains as a function of many deposition and exhumation cycles. In line with taphonomic experiments, nodular (celle-poriform) bryozoans disappear before robust and delicate branching bryozoans. Resistant grains include echinoderm ossicles, bivalve shell materials (calcitic), foraminifers, balanids, and non-carbonate particles. The quantitative proportions of these grains have been used to define microta-phofacies (new term). Particle and, therefore, sequence dynamics of temperate carbonate-ramp systems resemble these in siliciclastic environments, and challenge the classic concept of (tropical) carbonate sequence stratigraphy. Careful microfacies analysis of temperate skeletal carbonate depositional systems and depositional sequences provides an important additional tool in further understanding the architecture of bioclastic carbonate bodies in the subsurface.