We used mu-XANES spectroscopy to measure the oxidation state of europium in-situ at near-mu m resolution ill hydrothermal scheelite from the giant Archean gold deposits of Kalgoorlie, Western Australia. By combining these measurements with mu-XRF imaging, it is possible to distinguish inhomogeneities in Eu(2+)/Eu(3+) ratios that developed during mineral precipitation from the effects of subsequent hydrothermal alteration and weathering. Thermodynamic analysis reveals that under the conditions typical of the formation of many Au deposits, the Eu(2+)Eu(3+) ratio in the hydrothermal fluid is highly sensitive to pH. The range in pH calculated from the Eu(2+)/Eu(3+) ratios in the analyzed scheelite corresponds to a maximum in Au solubility under the ore-forming conditions, and suggests buffering of pH by the CO(2(aq))-rich fluid. The primary heterogeneity of the Karlgoorlie scheelite most likely results from pH oscillating between fluid- and rock-buffered conditions, and reflects the dynamics of the hydrothermal system. (C) 2008 Elsevier B.V. All rights reserved.