Upper Miocene carbonates, Nijar, Spain have been studied in order to test a model for massive dolomitization of western Mediterranean reefal carbonates invoking evaporite brines formed during the Messinian salinity crisis. Tortonian-Messinian reef-bearing carbonates at Nijar comprise a kilometers-wide shelf fringing the Sierra Alhamilla highland, and dip southward into the evaporite-bearing Nijar Basin. In the Nijar platform, pervasive dolomites are present in greater than 75% of Tortonian-Messinian carbonates. Dolomites transect intra-Miocene sequence boundaries and occur in the youngest Messinian unit at Nijar, the oolitic Terminal Carbonate Complex (TCC). Dolomites do not transect the Miocene-Pliocene unconformity, but do occur as clasts in basal Pliocene lime grainstones. This constrains the dolomitization as syn- or post-TCC and pre-Pliocene in age, and suggests that dolomitization occurred within 600,000 years and possibly in less than 200,000 years. Carbon and oxygen isotopes of Nijar dolomites show marked positive covariation, with most values ranging from +5.4 to -1.2% delta 18 O PDB and +2.5 to -4.3% delta 13 C PDB. The highest delta 18 O values are heavier than reasonable estimates of Messinian normal-salinity seawater dolomites, and therefore imply involvement of evaporative brines. Calculations of covariations of O and C isotopes during water-rock interaction and fluid-fluid mixing argue against recrystallization of Nijar dolomites, an interpretation supported by their Ca richness (49-57 mol %). These mixing calculations show that about 80% of Nijar data are consistent with dolomitization in mixtures of freshwater and a few tens of percent of seawater-derived evaporative brine, and about 20% are consistent with mixtures of freshwater and normal-salinity seawater. 87 Sr/ 86 Sr of pure Nijar dolomites range from Messinian seawater values (0.7089) to high values (0.70928), and show distinct negative covariations with delta 18 O, delta 13 C, and Sr. Calculations of covariations of 87 Sr/ 86 Sr with delta 18 O and delta 13 C during water-rock interaction and fluid-fluid mixing argue strongly against recrystallization, and argue for their formation by mixtures of freshwater with a few tens of percent of evaporative brines, with seawater, and with seawater-brine mixtures. Modeling covariations of 87 Sr/ 86 Sr and Sr/Ca ratios during mixing further supports involvement of evaporative brine, and suggests that the freshwaters had low Sr/Ca ratios and relatively high Sr and Ca concentrations. Na, Cl, and SO 4 concentrations in Nijar dolomites (200-1700 ppm, 300-600 ppm, and 600-6500 ppm, respectively) argue for involvement of evaporative brines, and of mixtures of freshwater and seawater, when compared with other well-characterized dolomites. The proposed model is that most dolomitization occurred after reef formation, and during and possibly after TCC deposition, during multiple relative sealevel changes. The model invokes TCC deposition on the Nijar shelf during high sealevels, and evaporite deposition in Nijar basin during low sealevels, during which brines in the 5x- to 6x-seawater range were formed. During sealevel rises these brines mixed with seawater or remained as dense basin bottom water. In either case, the brines mixed with freshwater mainly in a groundwater setting, the freshwaters having radiogenic Sr and depleted delta 18 O and delta 13 C derived from a weathered mantle on the Sierra Alhamilla. The brines and sea water-brine mixtures were the sources of Mg for the dolomites, and their circulation through platform rocks was driven primarily by buoyant circulation of the mixing zone beneath freshwater lenses. The Nijar model may be applicable to dolomitization in other partially land-locked basins having adjoining highlands (e.g., Sorbas Basin) that acted as freshwater recharge areas. The Mallorcan model, which invokes brines and seawater with no freshwater, may be appropriate for settings open to the deep Mediterranean and distant from highlands (e.g., Santa Pola, Spain; Mellilla, Morocco).