Dolostones in the deeply buried (3000-5000 m) Swan Hills Formation in the Wild River and contiguous area in westcentral Alberta occur along bank margins and as bodies up to tens of metres thick behind the margin. These replacive dolomites have mainly nonplanar textures, enriched delta 13 C (0.00 to 2.9 per mil PDB), widely variable delta 18 O (-9.0 to -4.3 per mil. PDB) and slightly to moderately radiogenic strontium isotopes ( 87 Sr/ 86 Sr ratios of 0.7086 to 0.7111). The key in discerning the origin of these dolostones was the use of fluorescence petrography in identifying two major phases of dolomite formation. These two phases are most evident along the margins of stromatoporoid molds and vugs in dolostones from the bank interior. The first phase consists of a continuum of brightly fluorescing matrix to saddle or euhedral dolomites and is followed, after a hiatus marked by both corrosion and fracturing, by dull to dead fluorescing second-phase saddle dolomite cements. This epifluorescence-defined stratigraphy provided a framework in which geochemical data could be analyzed in an unambiguous manner. Homogenization temperatures measured from both phases overlap, but are generally higher for second-phase saddle dolomite cements. These second-phase dolomites exhibit a wide range of elevated homogenization temperatures and isotopic signatures which match temperatures and fluid chemistries forecasted for burial from depths of approximately 1.2 to 7 km. These relationships imply that these dolomites precipitated from Cretaceous to Eocene time during the evolution of the Cordilleran foreland basin succession. Significantly, the higher range of homogenization temperatures for first-phase, dominantly replacement dolomites are more elevated than the lower range of homogenization temperatures for second-phase saddle dolomites. This implies that first-phase replacement dolomites correspond to a phase of heating, followed by cooling prior to Cordilleran burial, and formed at burial depths shallower than approximately 1.7 km, the estimated maximum depth of burial before Cordilleran loading. Other petrographic relationships and fluid inclusion measurements further constrain dolomitization to burial depths of at least a few hundred metres and from residual evaporitic brines with elevated temperatures up to 140 degrees C. These conditions are also substantiated by fluid inclusion measurements from burial calcite cements, which are partly replaced by dolomite in the zone of transition from limestone to dolostone. These same calcite cements, and associated saddle dolomite cements, also occur in Swan Hills and Leduc limestones away from the dolostones. These cements also have elevated homogenization temperatures, indicating heating by thermal conduction away from the dolostones, prior to Cordilleran burial. Our dolomitization model has been built by constraining both the age and burial depth of dolomitization, as well as the temperature and composition of the dolomitizing fluids. This model of dolomitization (Thermoflux) invokes both seepage reflux and thermal convection of residual evaporitic brines. Mg mass balance and fluid storage considerations confine dolomitization to an open flow system, suggesting most dolomites formed concurrent with Late Devonian (latest Frasnian) evaporite formation. Thermal convection corresponds to heating associated with the Antler Orogeny along the continental margin of western North America. However, thermal convection probably continued on after evaporite formation for the duration of this thermal phase. This resulted in the additional formation of a small but significant amount of dolomite.