Trehalose is a versatile non-reducing sugar. In some animal groups possessing its intrinsic production machinery, it is used as a potent protectant against environmental stresses, as well as blood sugar. However, the trehalose biosynthesis genes remain unidentified in the large majority of metazoan phyla, including vertebrates. To uncover the evolutionary history of trehalose production machinery in metazoans, we scrutinized the available genome resources and identified bifunctional trehalose-6-phosphate synthase-trehalose-6-phosphate phosphatase (TPS–TPP) genes in various taxa. The scan included our newly sequenced genome assembly of a desiccation-tolerant tardigrade
Paramacrobiotus
sp. TYO, revealing that this species retains TPS–TPP genes activated upon desiccation. Phylogenetic analyses identified a monophyletic group of the many of the metazoan TPS–TPP genes, namely ‘pan-metazoan’ genes, that were acquired in the early ancestors of metazoans. Furthermore, coordination of our results with the previous horizontal gene transfer studies illuminated that the two tardigrade lineages, nematodes and bdelloid rotifers, all of which include desiccation-tolerant species, independently acquired the TPS–TPP homologues via horizontal transfer accompanied with loss of the ‘pan-metazoan’ genes. Our results indicate that the parallel evolution of trehalose synthesis via recurrent loss and horizontal transfer of the biosynthesis genes resulted in the acquisition and/or augmentation of anhydrobiotic lives in animals.