The electronic structure of metal-semiconductor (or insulator) interfaces is studied using the self-consistent pseudopotential method. The metal is simulated by a jellium model for the positive background with a charge density equivalent to than of aluminum. For the metal-Ge(111) interface, a high density of metal-induced gap states is found which p ns the Fermi level. These states are free-electron-like in the jellium and decay exponentially into the Ge. The calculated Schottky-barrier height is 0.55 eV and the index of interface behavior S is 0.14, in agreement with experiment. The behavior of the diamond Schottky barrier is crucial in the theory of Schottky barriers because of its large gap and zero ionicity. For the metal-diamond interface, the density of metal-induced gap states is found to be smaller than in the case of Ge. Predictions based on experimental extrapolations give S=0. Our calculations give S=0.4. We obtained a barrier height of 2.2 eV, in agreement with experiment. The theory of the Schottky barrier is discussed using present results. © 1978 The American Physical Society.