Ribosomally synthesized peptides are built out of L-amino acids, whereas D-amino acids are generally the hallmark of non-ribosomal synthetic processes. Here we show that the model bacterium Bacillus subtilis is able to produce a novel type of ribosomally synthesized and post-translationally modified peptide that contains D-amino acids, and which we propose to call epipeptides. We demonstrate that a two [4Fe-4S]-cluster radical S-adenosyl-L-methionine (SAM) enzyme converts L-amino acids into their D-counterparts by catalysing Cα-hydrogen-atom abstraction and using a critical cysteine residue as the hydrogen-atom donor. Unexpectedly, these D-amino acid residues proved to be essential for the activity of a peptide that induces the expression of LiaRS, a major component of the bacterial cell envelope stress-response system. Present in B. subtilis and in several members of the human microbiome, these epipeptides and radical SAM epimerases broaden the landscape of peptidyl structures accessible to living organisms.