Removes C-terminal D-alanyl residues from sugar-peptide cell wall precursors (PubMed:3933484). Required specifically for the synthesis of the spore form of peptidoglycan (cortex) (Probable). Preferential cleavage: (Ac)2-L-Lys-D-Ala-|-D-Ala. Also transpeptidation of peptidyl-alanyl moieties that are N-acyl substituents of D-alanine. Optimum pH is 7-8.5. Cell wall biogenesis; peptidoglycan biosynthesis. Expressed at about stage III of sporulation. Specifically enriched in stage IV forespores but not in stage IV mother cells (PubMed:3933484, PubMed:3080407). Belongs to the peptidase S11 family.