The enzyme catalyses the reincorporation into peptidoglycan of the tripeptide?L-alanyl-¦Ã-D-glutamyl-2,6-meso-diaminoheptanedioate released during the maturation and constant remodeling of this bacterial cell wall polymer that occur during cell growth and division. The enzyme can also use the tetrapeptide?L-alanyl-¦Ã-D-glutamyl-meso-2,6-diaminoheptanedioyl-D-alanine or the pentapeptide?L-alanyl-¦Ã-D-glutamyl-meso-2,6-diaminoheptanedioyl-D-alanyl-D-alanine?in vivo?and?in vitro. Requires Mg2+.