After annealing in a H-2 atmosphere at different temperatures, (100)-oriented n-GaAs substrates were metallized with Au and Ti layers of different thicknesses to form Au/n-GaAs and Ti/n-GaAs Schottky diodes. The Schottky barrier height (SBH) variation and its dependence on subsequent N-2 annealing for these Schottky diodes have been studied by different measurement techniques (I-V, C-V and BEEM) to obtain reliable values. These methods show that pre-metallization annealing leads to a less homogeneous metal semiconductor (MS) interface. In case of thick Au layers the effective barrier height is reduced as soon as the H-2 annealing temperature reaches 300 degreesC. However, GaAs samples covered with thin Au layers or Ti layers do not exhibit such a barrier height reduction. The lower value in the case of thick Au layers is attributed to H+ groups, present at the interface due to the annealing in H2 atmosphere, forming interfacial dipoles with Au, leading to an inhomogeneous barrier and a decrease of the effective barrier height. It seems that these dipoles disappear again in the case of thin Au layers or are not formed with Ti. Post-metallization N-2 annealing at higher temperatures lowers the barrier height for all samples. The resulting barrier inhomogeneities are explained and analysed using the bond polarization theory of Tung (2001 Phys. Rev. B 64 205310, 2001 Mater. Sci. Eng. R 35), a recent Schottky barrier formation model and the pinch-off model (Tung 1992 Phys. Rev. B 45 13509).