Natural gas is found in Upper Permian and Lower Triassic dolomite reservoirs of the NE Sichuan Basin, China. Studying the mechanisms for porosity-modifying dolomitization and predicting its spatial distribution is of great importance for exploration and field appraisal. Subsurface core samples from the oolitic Lower Triassic Feixianguan Formation and outcrop samples reef carbonate Upper Permian Changxing Formation were studied using cathodoluminescence (CL), electron microprobe, fluid inclusion and isotope studies (δ18O, δ13C and 87Sr/86Sr), in an attempt to determine the origin of the dolomitizing fluids. Trace element and isotope data show that Lower Triassic seawater was most likely responsible for dolomitization of both the Permian and Triassic rocks. Sr/Ca molar ratios, calculated for the diagenetic fluid, suggest seawater was involved in dolomitization. Strontium isotope data suggest that seawater 87Sr/86Sr during the Jialingjiang (Lower Triassic) reached 0.7078; this ratio is recorded ubiquitously in both Lower Triassic oolitic dolomite and the underlying Lower Permian reef dolomite. In the Permian Changxing Formation, elevated Triassic 87Sr/86Sr values have overprinted the significantly lower 87Sr/86Sr ratio characteristic of Upper Permian seawater. Fluid inclusion analysis led to the conclusion that dolomitization must have commenced at a temperature lower than about 50°C. Integrating the sedimentology, petrology and geochemistry data, we conclude that coeval Lower Triassic (Feixianguan or slightly younger) seawater caused dolomitization by a reflux-seepage process for both the Lower Triassic and Upper Permian units. There is no evidence for deep burial or meteoric-marine mixing-zone dolomitization. It is likely that evaporating seawater initially flowed into the highly porous oolitic Feixianguan Formation in a sabkha/lagoonal setting and precipitated anhydrite nodules and beds. Concomitant dolomitization, in the underlying Permian reef carbonates, continued during seepage even after the supply of sulphate was exhausted, leading to an absence of anhydrite in Permian Changxing Formation.