Bypass of the penicillin-binding proteins by an L,D-transpeptidase (Ldt(fm)) confers cross-resistance to beta-lactam and glycopeptide antibiotics in mutants of Enterococcus faecium selected in vitro. Ldt(fm) is produced by the parental strain D344S although it insignificantly contributes to peptidoglycan cross-linking as pentapeptide stems cannot be used as acyl donors by this enzyme. Here we show that production of the tetrapeptide substrate of Ldt(fm) is controlled by a two-component regulatory system (DdcRS) and a metallo-D,D-carboxypeptidase (DdcY). The locus was silent in D344S and its activation was due to amino acid substitutions in DdcS or DdcR that led to production of DdcY and hydrolysis of the C-terminal D-Ala residue of the cytoplasmic peptidoglycan precursor UDP-MurNAc-pentapeptide. The T(161)A and T(161)M substitutions affected a position of DdcS known to be essential for the phosphatase activity of related sensor kinases. Complete elimination of UDP-MurNAc-pentapeptide, which was required specifically for resistance to glycopeptides, involved substitutions in DdcY that increased the catalytic efficiency of the enzyme (E(127)K) and affected its interaction with the cell envelope (I(14)N). The ddc locus displays striking similarities with portions of the van vancomycin resistance gene clusters, suggesting possible routes of emergence of cross-resistance to glycopeptides and beta-lactams in natural conditions.