Nodularia spumigena is a bloom-forming cyanobacterium which produces the hepatotoxin nodularin. The complete gene cluster encoding the enzymatic machinery required for the biosynthesis of nodularin in N. spumigena strain NSOR10 was sequenced and characterized. The 48-kb gene cluster consists of nine open reading frames (ORFs), ndaA to ndaI, which are transcribed from a bidirectional regulatory promoter region and encode nonribosomal peptide synthetase modules, polyketide synthase modules, and tailoring enzymes. The ORFs flanking the nda gene cluster in the genome of N. spumigena strain NSOR10 were identified, and one of them was found to encode a protein with homology to previously characterized transposases. Putative transposases are also associated with the structurally related microcystin synthetase (mcy) gene clusters derived from three cyanobacterial strains, indicating a possible mechanism for the distribution of these biosynthetic gene clusters between various cyanobacterial genera. We propose an alternative hypothesis for hepatotoxin evolution in cyanobacteria based on the results of comparative and phylogenetic analyses of the nda and mcy gene clusters. These analyses suggested that nodularin synthetase evolved from a microcystin synthetase progenitor. The identification of the nodularin biosynthetic gene cluster and evolution of hepatotoxicity in cyanobacteria reported in this study may be valuable for future studies on toxic cyanobacterial bloom formation. In addition, an appreciation of the natural evolution of nonribosomal biosynthetic pathways will be vital for future combinatorial engineering and rational design of novel metabolites and pharmaceuticals.