BackgroundSorbicillinoids are a family of complex cyclic polyketides produced by only a small number of distantly related ascomycete fungi such as Trichoderma (Sordariomycetes) and Penicillium (Eurotiomycetes). In T. reesei, they are synthesized by a gene cluster consisting of eight genes including two polyketide synthases (PKS). To reconstruct the evolutionary origin of this gene cluster, we examined the occurrence of these eight genes in ascomycetes.ResultsA cluster comprising at least six of them was only found in Hypocreales (Acremonium chrysogenum, Ustilaginoidea virens, Trichoderma species from section Longibrachiatum) and in Penicillium rubens (Eurotiales). In addition, Colletotrichum graminicola contained the two pks (sor1 and sor2), but not the other sor genes. A. chrysogenum was the evolutionary eldest species in which sor1, sor2, sor3, sor4 and sor6 were present. Sor5 was gained by lateral gene transfer (LGT) from P. rubens. In the younger Hypocreales (U. virens, Trichoderma spp.), the cluster evolved by vertical transfer, but sor2 was lost and regained by LGT from C. graminicola. SorB (=sor2) and sorD (=sor4) were symplesiomorphic in P. rubens, whereas sorA, sorC and sorF were obtained by LGT from A. chrysogenum, and sorE by LGT from Pestalotiopsis fici (Xylariales). The sorbicillinoid gene cluster in Trichoderma section Longibrachiatum is under strong purifying selection. The T. reesei sor genes are expressed during fast vegetative growth, during antagonism of other fungi and regulated by the secondary metabolism regulator LAE1.ConclusionsOur findings pinpoint the evolution of the fungal sorbicillinoid biosynthesis gene cluster. The core cluster arose in early Hypocreales, and was complemented by LGT. During further speciation in the Hypocreales, it became subject to birth and death evolution in selected lineages. In P. rubrens (Eurotiales), two cluster genes were symplesiomorphic, and the whole cluster formed by LGT from at least two different fungal donors.Electronic supplementary materialThe online version of this article (doi:10.1186/s12862-016-0834-6) contains supplementary material, which is available to authorized users.