Polyamine biosynthesis is an ancient metabolic pathway present in all organisms. Aminopropyltransferases are key enzymes that mediate the synthesis of spermidine, spermine, and thermospermine. The relatively high sequence similarity between aminopropyltransferases and their similarity with putrescine N-methyltransferases (PMT) raises the question of whether they share a common ancestor or have evolved by convergence. Here we show that aminopropyltransferases and PMT are phylogenetically interconnected, and the different activities have been generated by unusually frequent events of diversification of existing functions. Although all spermidine synthases (SPDSs) derive from a common ancestor preceding the separation between prokaryotes and eukaryotes, they have been the origin of a variety of new activities. Among those, spermine synthases (SPMSs) represent a novelty independently arisen at least 3 times, in animals, fungi, and plants. The most parsimonious mechanism would involve the duplication and change of function of preexisting SPDS genes in each phylum. Although spermine is not essential for life, the repeated invention of SPMS and its conservation strongly argues for an evolutionary advantage derived from its presence. Moreover, the appearance of thermospermine synthase (tSPMS) in several genera of Archaea and Bacteria was accompanied by a loss of SPDS, suggesting that the new activity originated as a change of function of this enzyme. Surprisingly, tSPMS was later acquired by plants at an early stage of evolution by horizontal gene transfer and has proven to be essential for vascular development in tracheophytes. Finally, the synthesis of nicotine and tropane alkaloids in Solanales was favored by the origination of a new activity, PMT, as a duplication and change of function from SPDS.