The ascomycetous genus Cordyceps accommodates endoparasitic species that attack arthropods or other fungi. Analyses of ITS nrDNA sequence data of 72 taxa from the teleomorph genera Cordyceps, Claviceps, Epichloë, and the anamorph genera Akanthomyces, Beauveria, Metarhizium, Hirsutella, Hymenostilbe, Paecilomyces, Polycephalomyces, and Tolypocladium assigned the taxa to four main evolutionary lineages not reflected in the current classification of Cordyceps. Ten subclades were recognized from separate analyses of data subsets. Judged from the ITS phylogenies, Cordyceps spp. with branched stromata were highly supported as a divergent lineage. Host specificity was found to be of limited phylogenetic significance, and several host shifts are suggested to have occurred during the evolution of Cordyceps. Similar ascospore morphology was not reflected in the phyletic groups, and closely related taxa showed large interspecific variation with respect to the number of segments in which the ascospores are divided. However, combinations of selected characters were found to delimitate some lineages, e.g. all Cordyceps spp. that attack hosts in the insect orders Coleoptera and Lepidoptera, and with non-immersed perithecia and clavate to acicular, brightly yellowish to reddish stromata, constituted a separate clade. Furthermore, all Cordyceps spp. with perithecia obliquely immersed in the stroma were recognized as a distinct monophyletic group. This clade is additionally characterized by the formation of anamorphs ascribable to the genus Hymenostilbe. The mycogenous Cordyceps spp. grouped in a separate subclade, interspersed by two cicadaen parasites and all Tolypocladium spp. except T. parasiticum. Tolypocladium and Beauveria were found to be polyphyletic. The included Claviceps and Epichloë taxa appeared to be derived within Cordyceps, thus making Cordyceps paraphyletic as suggested in other studies.