The Kimmeridgian Alcobaça Formation of the Lusitanian Basin forms a mixed carbonate–siliciclastic unit between basinal deposits of the Abadia Formation, and fluvial–terrestrial strata of the Lourinhã Formation. This study presents >2.5 km of detailed logs of nine outcrop sections of the Alcobaça Formation in its type region. Eight of these sections encircle the Caldas da Rainha Diapir, which was a prominent, emergent, passive salt diapir during the time of deposition. Palaeoenvironments of the unit form a complex mosaic of low- to high-energy, carbonate- or siliciclastic-dominated shallow shelf settings; coastal embayments and lagoons; and coastal plains with rivers, lakes and playas. In the strata, abundant microfauna is often joined by a rich macrofauna, usually dominated by bivalves. Locally, corals, calcareous sponges or oysters form meadows or patch reefs. These autochthonous to parautochthonous remnants of former communities are assigned to 35 benthic macrofaunal associations. The integration of palaeoecological analysis of these associations with microfaunal and sedimentological data provides constraint on their salinity ranges, which range from slightly hypersaline to freshwater. Frequent temporal and spatial salinity fluctuations are attributed to variations in relative sea-level, salt tectonics or climate. The NNE-trending Caldas da Rainha Diapir induced pronounced facies differentiation. Predominantly, non-marine siliciclastic facies in the northwest and carbonate to siliciclastic, marine to brackish facies in the southwest are contrasted by shallow-marine carbonate facies east of the diapir. Comprehensive exposure and well-preserved fossils make the Alcobaça Formation an excellent showcase to demonstrate how biofacies analysis can help to disentangle the interplay of climate changes, sea-level fluctuations and salt tectonics. Based on the improved characterisation of the unit, the Alcobaça Formation is formally defined, and seven members are established.