A search for scalar and vector leptoquarks coupling to first generation fermions is performed using the e+p and e−p scattering data collected by the H1 experiment between 1994 and 2000. The data correspond to a total integrated luminosity of 117 pb−1. No evidence for the direct or indirect production of such particles is found in data samples with a large transverse momentum final state electron or with large missing transverse momentum. Constraints on leptoquark models are established. For leptoquark couplings of electromagnetic strength, leptoquarks with masses up to 275–325 GeV are ruled out at 95% confidence level. These limits improve and supercede earlier H1 limits based on subsamples of the data used here.