Abstract. It has been suggested that iron in InP is compensated by a donor, related to the 2316 cm −1 local vibrational mode and previously assigned to the fully hydrogenated indium vacancy, V In H 4 . Using AIMPRO, an ab initio local density functional cluster code, we find that V In H 4 acts as a single shallow donor. It has a triplet vibrational mode at around this value, consistent with this assignment. We also analyse the other hydrogenated vacancies V In H n , n = 1, 3, and determine their structure, vibrational modes, and charge states. Substitutional group II impurities also act as acceptors in InP, but can be passivated by hydrogen. We investigate the passivation of beryllium by hydrogen and find that the hydrogen sits at a bond-centred site and is bonded to its phosphorus neighbour. Its calculated vibrational modes are in good agreement with experiment.