The structural and electronic properties of the relaxed GaN/Al interface are determined from first-principles local-density full-potential linearized augmented plane-wave calculations. The atomic-site projected electronic density of states and the charge density, calculated as a function of the distance from the interface, show that the gap states induced into the semiconductor by the presence of Al are strongly localized in the interface region with a decay length ϳ 3.5 a.u. We also study two related systems, the Al/AlN and GaN/AlN interfaces, both grown on a GaN substrate. Our results indicate that Al does not provide good Ohmic contacts on the atomically defect-free nitrides considered, in contrast with experimental results on chemically treated GaN but in agreement with recent measurements on the clean surface. By comparing the three interfaces studied, we also find that the transitivity rule is approximately satisfied and that small deviations must be attributed to differences in the interface morphology.