Dolomitization is the most significant diagenetic process to affect Jurassic carbonate reservoirs along the Central Atlantic Margin (CAM). Despite several studies on dolomitization from different parts of CAM, the origin of these dolomites and their influence on the subsequent diagenetic evolution of Jurassic carbonate systems remains enigmatic. In addition, while dolomitization is evident at the surface and in the subsurface of the Moroccan Atlantic Margin, virtually no detailed studies have been conducted to determine the origin, mechanism, and significance of dolomitization in this basin. Therefore, the principal objective of this study is to assess the origin and occurrence of dolomite in the of Upper Sinemurian-Lower Pliensbachian carbonates of the Arich Ouzla Formation in the Essaouira-Agadir Basin by using petrography and geochemistry.The shallow marine carbonates of the Arich Ouzla Formation have been partially dolomitized and are exposed on the salt-cored Amsittene Anticline. The dolomite is stratabound, and predominantly fabric-retentive, although in some parts it is partially replaced by non-stratabound, fabric-destructive dolomites. From petrographic ob- servations and geochemical proxies, the fabric-preserving dolomites show dolomitization by reflux of mesohaline seawater (δ18Odolomite average = − 3.5 ‰ VPDB, and δ13Cdolomite average = 2.0 ‰ VPDB). In contrast, petro- graphic and geochemical characteristics of the fabric destructive dolomites suggest precipitation from modified seawater/formational brines convected along faults and fractures evidenced by depleted δ18O isotopic values (average = − 4.1 ‰ VPDB) with high fluid temperatures (average = 78 ◦C; range = 66–90 ◦C) where fluids interacted with the basal Triassic evaporites and siliciclastic sediments.Fabric preserving dolomite has higher porosity (average = 6.0 %) than the precursor limestones (average = 0.4 %), whereas permeability in both rock types (average = 0.48 mD, and average = 0.02 mD, respectively) is low. Fabric destructive dolomite has low porosity in proximity to fracture corridors (average = 1.9 %) due to dolomite recrystallization (overdolomitization), whereas porosity increases to an average of 7.4%, away from fracture corridors. The dolomites are post-dated by calcite cement which occludes vugs, intercrystalline pores and fractures. The calcite is interpreted to be meteoric in origin, because of its non-cathodoluminescence and depleted δ18O (average = − 4.7 ‰ VPDB) and δ13C (average = − 9.3 ‰ VPDB) isotopic values with respect to Jurassic marine carbonates. The meteoric calcites co-exist with bitumen suggesting that hydrocarbon migration in the basin likely occurred at the same time, most likely during basin inversion and exposure. This work con- siders dolomitization to be a localised process due to salt diapirism and demonstrates that the coincidence of hydrocarbon emplacement with basin inversion results in degradation and probably leakage of hydrocarbons. This emphasises the importance of local and regional tectonics, including salt diapirism, on patterns of diagenetic overprint in sedimentary basins