Cyanobacteria are frequently involved in the formation of harmful algal blooms wherein, apart from the toxic microcystins, other groups of bioactive peptides are abundant as well, such as anabaenopeptins (APs). The APs are synthesized nonribosomally as cyclic hexapeptides with various amino acids at the exocyclic position. We investigated the presence and recombination of the AP synthesis gene cluster (apnA-E) through comparing 125 strains of the bloom-forming cyanobacterium Planktothrix spp., which were isolated from numerous shallow and deep water habitats in the temperate and tropical climatic zone. Ten ecologically divergent strains were purified and genome sequenced to compare their entire apnA-E gene cluster. In order to quantify apn gene distribution patterns, all the strains were investigated by PCR amplification of 2 kbp portions of the entire apn gene cluster without interruption. Within the 11 strains assigned to P. pseudagardhii, P. mougeotii, or P. tepida (Lineage 3), neither apnA-E genes nor remnants were observed. Within the P. agardhii/P. rubescens strains from shallow waters (Lineage 1, 52 strains), strains both carrying and lacking apn genes occurred, while among the strains lacking the apnA-E genes, the presence of the 5'end flanking region indicated a gene cluster deletion. Among the strains of the more derived deep water ecotype (Lineage 2, 62 strains), apnA-E genes were always present. A high similarity of apn genes of the genus Planktothrix when compared with strains of the genus Microcystis suggested its horizontal gene transfer during the speciation of P. agardhii/P. rubescens. Genetic analysis of the first (A1-) domain of the apnA gene, encoding synthesis of the exocyclic position of the AP molecule, revealed four genotype groups that corresponded with substrate activation. Groups of genotypes were either related to Arginine only, the coproduction of Arginine and Tyrosine or Arginine and Lysine, or even the coproduction of Arginine, Tyrosine, and Lysine in the exocyclic position of the AP-molecule. The increased structural diversity resulted from the evolution of apnA A1 genotypes through a small number of positively selected point mutations that occurred repeatedly and independently from phylogenetic association.