Abstract In filamentous fungi a system known as somatic incompatibility (SI) governs self/non-self recognition. SI is controlled by a regulatory signaling network involving proteins encoded at the het (heterokaryon incompatible) loci. Despite the wide occurrence of SI, the molecular identity and structure of only a small number of het genes and their products have been characterized in the model fungi Neurospora crassa and Podospora anserina. Our aim was to identify and study the distribution and evolution of putative het gene homologs in the Basidiomycota. For this purpose we used the information available for the model fungi to identify homologs of het genes in other fungi, especially the Basidiomycota. Putative het-c, het-c2 and un-24 homologs, as well as sequences containing the NACHT, HET or WD40 domains present in the het-e, het-r, het-6 and het-d genes were identified in certain members of the Ascomycota and Basidiomycota. The widespread phylogenetic distribution of certain het genes may reflect the fact that the encoded proteins are involved in fundamental cellular processes other than SI. Although homologs of het-S were previously known only from the Sordariomycetes (Ascomycota), we also identified a putative homolog of this gene in Gymnopus luxurians (Basidiomycota, class Agaricomycetes). Furthermore, with the exception of un-24, all of the putative het genes identified occurred mostly in a multi-copy fashion, some with lineage and species-specific expansions. Overall our results indicated that gene duplication followed by gene loss and/or gene family expansion, as well as multiple events of domain fusion and shuffling played an important role in the evolution of het gene homologs of Basidiomycota and other filamentous fungi.