To achieve reliable, thermally stable ohmic contacts to n-GaAs, surface preparation and thickness of the AuGeNi films must be properly chosen. In this work the contact resistance as a function of the alloying temperature cycle has been studied for different AuGeNi thickness and sputter cleaning conditions. In-situ X-ray photoemission spectroscopy (XPS) analysis of the sputter-cleaned GaAs-surface showed that the As2O3was removed first, leaving a sputter damaged layer of GaAs containing 0.3 - 1 nm of Ga2O3. If a thin As2O3layer was left on the surface, the contact resistance was large and non-uniform. At the optimum sputter cleaning conditions, when 5 nm of Ni was deposited first followed by 100 nm of AuGe, 30 nm of Ni and 50/100 nm of Au, the contact resistance was low and uniform with Rc¿0.1 ¿ - mm. Transmission electron microscope (TEM) analysis showed that a high density of uniform NiAs(Ge) grains at the GaAs interface is responsible for the much improved uniformity and thermal stability. Spread in contact resistance is due to the β - AuGa phase contacting the GaAs.