beta-Lactam antibiotics are generally thought to inhibit their target enzymes, the bacterial cell wall-synthesizing DD-peptidases, because of their resemblance to D-alanyl-D-alanine peptides. Although a favorable conformation of the latter does structurally resemble the beta-lactams with respect to backbone conformation, a significant difference is the presence of a D-methyl substituent on the penultimate alanine residue of the cell wall peptide. A classical beta-lactam antibiotic has a hydrogen in the corresponding position. In the process of evolution of a beta-lactamase from a DD-peptidase, it seems likely that this D-methyl group would be selected against, to ensure that the former enzyme would hydrolyze beta-lactams rather than peptides. In this paper, the effect of the penultimate D-alanine residue (as opposed to a glycine residue) has been examined in peptide substrates of a present-day DD-peptidase and a beta-lactamase. The peptides N-(phenylacetyl)-D-alanyl-D-phenylalanine and N-(phenylacetyl)glycyl-D-phenylalanine were used as a test pair against the DD-peptidase of Streptomyces R61 and the structurally very similar class C beta-lactamase of Enterobacter cloacae P99. The kinetics of turnover of both of these substrates were determined for both enzymes. To quantify the partitioning of the acyl-enzyme intermediate, the aminolysis by D-phenylalanine of a cognate pair of depsipeptides was also studied. Thus, free energy-reaction coordinate diagrams were constructed for turnover of both peptides by both enzymes. Comparison of these profiles showed that the D-methyl group is preferred over hydrogen by the DD-peptidase at all stages of catalysis (acyl-enzyme and acylation and deacylation transition states), whereas the beta-lactamase selects against the D-methyl group only at the peptide acylation transition state. A process of evolution by uniform dissociation of the methyl group by the beta-lactamase has apparently occurred. These results were explored structurally by computational models of the acylation tetrahedral intermediates. A methyl group pocket on the DD-peptidase, less favorable on the beta-lactamase, was identified. The interaction of the leaving group, the terminal D-alanine residue, with the two enzymes was interesting, since it seemed that different positively charged active site residues were directly associated with the carboxylate, Lys 315 in the beta-lactamase and Arg 285 (rather than His 298) in the case of the DD-peptidase. The problems posed by larger substituents on the penultimate residue of the peptide, and in particular by the heterocyclic substituent present in a bicyclic beta-lactam, were analyzed. Qualitative and quantitative analysis of the models support the proposed importance of the penultimate D-alanine in beta-lactamase evolution.