The Upper Cretaceous shallow-marine sequence at Bahariya Oasis, northern Egypt, is composed of medium-grained dolomite of the El Heiz Formation. (Upper Cenomanian) and the El Hefhuf Formation (Campanian). Early formed crystal cores possess chemical signatures and cathodoluminescent (CL) microfabrics characteristic for each formation. In the El Heiz Formation, dolomite crystal cores are nonstoichiometric, ferroan, and possess relatively high Na and Mn contents and depleted δ18O values. Under CL, these dolomites exhibit a mottled microfabric, indicating partial dissolution and replacement of a precursor dolomite phase. In contrast, dolomite crystal cores of the El Hefhuf Formation are nearly stoichiometric, possess low Fe, Mn, and Na contents, are relatively enriched in δ18O, and exhibit a uniformly nonluminescent fabric. Despite differences in the character of the dolomite crystal cores among these two formations, the overall paragenetic sequence is quite similar. Dolomite core crystals are overgrown by a brightly luminescent dolomite cement that is Ca rich and Fe poor. Local calcitization of dolomite cores and this overgrowth is followed by precipitation of a vein-Filling calcite spar, which is present in both formations and in the overlying Maastrichtian chalks. This late-calcite spar exhibits a uniform isotopic composition independent of its host formation. The early calcite associated with dedolomitization is enriched in Mg, and its δ18O values lie intermediate between dolomite and late-calcite values. Because of similarities in their composition and fabric, it is suggested that both calcite and dolomite phases are related to a single diagenetic event. For example, carbonates of both formations were potentially affected by meteoric water derived at the post-Maastrichtian to pre-Eocene unconformity that has locally breached this sequence down to lower Cenomanian clastics. The distinctive Fe2+ contents of dolomite crystal cores between these formations, however, suggest two temporally separate events of dolomitization, rather than a single diagenetic event. Elevated Fe and Na contents of El Heiz Formation dolomite and the association with coeval pyrite indicate a marine origin for initial dolomitization of this formation. In contrast, depleted δ18O and trace-element values of dolomite from both formations and the similarity of compositional variation to co-occurring meteoric calcites argue for dolomitization within a mixed-water, meteoric-marine setting. Thus, it is suggested that a metastable precursor phase of dolomite formed in the El Heiz Formation from marine waters. This dolomite subsequently reacted with mixed-water fluids responsible for dolomitization of the El Hefhuf Formation. Such a process of dolomite-by-dolomite replacement is recorded in the mottled CL microfabrics of the El Heiz Formation dolomite crystal cores.