The gut microbiota of animals exert major effects on host biology [1]. Although horizontal transfer is generally considered the prevalent route for the acquisition of gut bacteria in mammals [2], some bacterial lineages have co-speciated with their hosts on timescales of several million years [3]. Termites harbor a complex gut microbiota, and their advanced social behavior provides the potential for long-term vertical symbiont transmission, and co-evolution of gut symbionts and host [4-6]. Despite clear evolutionary patterns in the gut microbiota of termites [7], a consensus on how microbial communities were assembled during termite diversification has yet to be reached. Although some studies have concluded that vertical transmission has played a major role [8, 9], others indicate that diet and gut microenvironment have been the primary determinants shaping microbial communities in termite guts [7, 10]. To address this issue, we examined the gut microbiota of 94 termite species, through 16S rRNA metabarcoding. We analyzed the phylogeny of 211 bacterial lineages obtained from termite guts, including their closest relatives from other environments, which were identified using BLAST. The results provided strong evidence for rampant horizontal transfer of gut bacteria between termite host lineages. Although the majority of termite-derived phylotypes formed large monophyletic groups, indicating high levels of niche specialization, numerous other clades were interspersed with bacterial lineages from the guts of other animals. Our results indicate that "mixed-mode" transmission, which combines colony-to-offspring vertical transmission with horizontal colony-to-colony transfer, has been the primary driving force shaping the gut microbiota of termites.