Most of the 470-million-year history of plants on land belongs to bryophytes, pteridophytes and gymnosperms, which eventually yielded to the ecological dominance by angiosperms 90 Myr ago. Our knowledge of angiosperm phylogeny, particularly the branching order of the earliest lineages, has recently been increased by the concurrence of multigene sequence analyses. However, reconstructing relationships for all the main lineages of vascular plants that diverged since the Devonian period has remained a challenge. Here we report phylogenetic analyses of combined data--from morphology and from four genes--for 35 representatives from all the main lineages of land plants. We show that there are three monophyletic groups of extant vascular plants: (1) lycophytes, (2) seed plants and (3) a clade including equisetophytes (horsetails), psilotophytes (whisk ferns) and all eusporangiate and leptosporangiate ferns. Our maximum-likelihood analysis shows unambiguously that horsetails and ferns together are the closest relatives to seed plants. This refutes the prevailing view that horsetails and ferns are transitional evolutionary grades between bryophytes and seed plants, and has important implications for our understanding of the development and evolution of plants.