Major episodes of horizontal gene transfer drove the evolution of land plants.