A new set of primers was developed allowing the specific detection of the pepN gene (coding for alanine aminopeptidase) from Gram-negative bacteria. The primers were designed in silico by sequence alignments based on available DNA sequence data. The PCR assay was validated using DNA from selected pure cultures. The analysis of gene libraries from extracted DNA from different soil samples revealed a high diversity of pepN related sequences mainly related to α-Proteobacteria. Most sequences obtained from clone libraries were closely related to already published sequences (<80% homology on amino acid level), which may be related to the conserved character of the amplified region of pepN. By linking the diversity data obtained by the clone library studies to potential enzymatic activities of alanine aminopeptidase, lowest diversity of pepN was found in those soil samples which displayed lowest activity levels, which confirms the importance of diversity for the ecosystem function mainly when transformation processes of complex molecules are studied.