The cycloaspeptides are bioactive pentapeptides produced by various filamentous fungi, which have garnered interest from the agricultural industry due to the reported insecticidal activity of the minor metabolite, cycloaspeptide E. Genome sequencing, bioinformatics and heterologous expression confirmed that the cycloaspeptide gene cluster contains a minimal 5-module nonribosomal peptide synthetase (NRPS) and a new type of trans-acting N-methyltransferase (N-MeT). Deletion of the N-MeT encoding gene and subsequent feeding studies determined that two modules of the NRPS preferentially accept and incorporate N-methylated amino acids. This discovery allowed the development of a system with unprecedented control over substrate supply and thus output, both increasing yields of specific metabolites and allowing the production of novel fluorinated analogues. Furthermore, the biosynthetic pathway to ditryptophenaline, another fungal nonribosomal peptide, was shown to be similar, in that methylated phenylalanine is accepted by the ditryptophenaline NRPS. Again, this allowed the directed biosynthesis of a fluorinated analogue, through the feeding of a mutant strain. These discoveries represent a new paradigm for the production of N-methylated cyclic peptides via the selective incorporation of N-methylated free amino acids.