An antibiotic, whose biological activity can be controlled with light, has been produced by researchers. Thanks to the robust diarylethene photoswitch, the antimicrobial effect of the peptide mimetic can be applied in a spatially and temporally specific manner. This might open up new options for the treatment of local infections, as side effects are reduced.