The D-alanine:D-alanine-ligase-related enzymes can have three preferential substrate specificities. Usually, these enzymes synthesize D-alanyl-D-alanine. In vancomycin-resistant Gram-positive bacteria, structurally related enzymes synthesize D-alanyl-D-lactate or d-alanyl-d-serine. The sequence of internal fragments of eight structural d-alanine:d-alanine ligase genes from enterococci has been determined. Alignment of the deduced amino acid sequences with those of other related enzymes from Gram-negative and Gram-positive bacteria revealed the presence of four distinct sequence patterns in the putative substrate-binding sites, each correlating with specificity to a particular substrate (D-alanine:D-lactate ligases exhibited two patterns). Phylogenetic analysis showed different clusters. The enterococcal subtree was largely superimposable on that derived from 16S rRNA sequences. In lactic acid bacteria, structural divergence due to differences in substrate specificity was observed. Glycopeptide resistance proteins VanA and VanB, the VanC-type ligases, and DdlA and DdlB from enteric bacteria and Haemophilus influenzae constituted separate clusters.