Microcystins represent an extraordinarily large family of cyclic heptapeptide toxins that are nonribosomally synthesized by various cyanobacteria. Microcystins specifically inhibit the eukaryotic protein phosphatases 1 and 2A. Their outstanding variability makes them particularly useful for studies on the evolution of structure-function relationships in peptide synthetases and their genes. Analyses of microcystin synthetase genes provide valuable clues for the potential and limits of combinatorial biosynthesis. We have sequenced and analyzed 55.6 kb of the potential microcystin synthetase gene (mcy) cluster from the filamentous cyanobacterium Planktothrix agardhii CYA 126. The cluster contains genes for peptide synthetases (mcyABC), polyketide synthases (PKSs; mcyD), chimeric enzymes composed of peptide synthetase and PKS modules (mcyEG), a putative thioesterase (mcyT), a putative ABC transporter (mcyH), and a putative peptide-modifying enzyme (mcyJ). The gene content and arrangement and the sequence of specific domains in the gene products differ from those of the mcy cluster in Microcystis, a unicellular cyanobacterium. The data suggest an evolution of mcy clusters from, rather than to, genes for nodularin (a related pentapeptide) biosynthesis. Our data do not support the idea of horizontal gene transfer of complete mcy gene clusters between the genera. We have established a protocol for stable genetic transformation of Planktothrix, a genus that is characterized by multicellular filaments exhibiting continuous motility. Targeted mutation of mcyJ revealed its function as a gene coding for a O-methyltransferase. The mutant cells produce a novel microcystin variant exhibiting reduced inhibitory activity toward protein phosphatases.