Calcite cementation and dolomitization are key diagenetic processes in many sedimentary systems. Unravelling detailed histories and timescales of cementation and replacement is, however, often compromised by the limited spatial resolution of many analytical techniques; in some cases multiple grains are co-analyzed so that diagenetic histories are blurred and reaction periods are difficult to establish. In this study we have used 10-micrometer-resolution, in situ secondary ion mass spectrometry to determine the oxygen isotope composition of 197 individual, 10–50-micrometer-size crystals of dolomite and calcite from six samples in a single core of Upper Devonian middle Bakken Member siltstones and sandstones, the major tight oil formation of the Williston basin, USA. This amount of data places important constraints on the range of temperatures and times that carbonate cementation and replacement occurred. Petrographic data show that microcrystalline calcite cement is an early phase, and combined with mineralogical data suggest that much of the dolomite replaces calcite. Over spatial scales of less than a centimeter, analyses of individual calcite crystals have a range of 5‰ for δ18O in the group of crystals, and for the group of individual dolomite crystals, 10‰. These sub-centimeter ranges are as great as those observed in previous studies of carbonate cements sampled over many meters and remind us that previous low-resolution studies may have inadvertently analyzed mixed phases. There is no relationship between dolomite texture and isotopic composition at this spatial scale; microscale backscattered electron imagery and scanning electron microscopy cathodoluminescence zoning is seen, but cannot be resolved with a 10-micrometer spot size. Assuming, since it is an early cement, that calcite precipitated from seawater (δ18O = –1.5‰), it formed at ca. 15–40°C, mainly at the lower temperatures. Present-day formation waters in Devonian rocks in this region have oxygen isotope compositions of 7–8‰ VSMOW. Using these values as a likely dolomitizing fluid, we suggest that dolomitization occurred continuously between 40 and 140°C over 150–200 million years, most likely in a fluid with a high Mg/Ca ratio resulting from gypsum formation in local evaporites. We suggest that this exceptionally low rate of dolomitization was controlled by the low rate of supply of Mg in a very sluggish flow regime; dolomitization is incomplete because of a limited supply of Mg.