The problem of Fermi-level pinning at semiconductor-metal contacts is readdressed starting from first-principles calculations for Al/GaAs. We give quantitative evidence that the Schottky barrier height is very little affected by any structural distortions on the metal side-including elongations of the metal-semiconductor bond (i.e. interface strain)-whereas it strongly depends on the interface structure on the semiconductor side. A rationale for these findings is given in terms of the interface dipole generated by the ionic effective charges.Despite several decades of extensive experimental and theoretical work, [1] the key factors affecting the Fermilevel pinning at metal-semiconductor contacts have not yet been clearly assessed. Since the microscopic morphology of the interface is not experimentally accessible, the controversy concerns even the very basic issue as to whether the pinning is determined by intrinsic interface states which exist even at an abrupt ideal interface, or by extrinsic electronic states arising from native defects. The experimental data are of little help in discriminating between different theoretical pictures, given that the value of the barrier for a given semiconductor depends very little on the nature of the metal, [1] and for a given metal/semiconductor pair it depends even less on the direction of growth. Ab initio calculations-though necessarily limited to rather idealized situations and affected by basic approximations necessary to cope with the complexity of the electronic many-body problem-allow instead, by their very nature, to have full control on the way the details at the atomic scale of a given system affect the various physical properties under investigation. In this sense, ab initio calculations are complementary to the experimental investigations and, in the specific case of metal-semiconductor contacts, they have in fact provided in recent year a great deal of quantititave information that any successful model will have to account for. [2][3][4][5][6][7][8] Because of this theoretical work, the following facts are now well established: the barrier height does depend of the nature of the metal; [2] it does depend on the crystallographic direction; and furthermore for a given crystallographic direction of growth it even depends on the microscopic morphology of the interface.[5] The electronic mechanisms governing the value of the Schottky barrier-as well as their variations as a function of the microscopic morphology of the interface-have not been systematically investigated so far and are basically unknown. Here we provide a contribution in this direction, by studying the barrier-height variations induced in Al/GaAs(001) by several structural and morphological perturbations which are switched on and off in our computational framework. Our calculations provide a microscopic probe for the nature of the interface-including its "effective" thickness-and for the electronic response phenomena responsible for the barrier height. The crucial role of the effective dynamical cha...