Homobasidiomycete fungi display many complex fruiting body morphologies, including mushrooms and puffballs, but their anatomical simplicity has confounded efforts to understand the evolution of these forms. We performed a comprehensive phylogenetic analysis of homobasidiomycetes, using sequences from nuclear and mitochondrial ribosomal DNA, with an emphasis on understanding evolutionary relationships of gilled mushrooms and puffballs. Parsimony-based optimization of character states on our phylogenetic trees suggested that strikingly similar gilled mushrooms evolved at least six times, from morphologically diverse precursors. Approximately 87% of gilled mushrooms are in a single lineage, which we call the "euagarics." Recently discovered 90 million-year-old fossil mushrooms are probably euagarics, suggesting that (i) the origin of this clade must have occurred no later than the mid-Cretaceous and (ii) the gilled mushroom morphology has been maintained in certain lineages for tens of millions of years. Puffballs and other forms with enclosed spore-bearing structures (Gasteromycetes) evolved at least four times. Derivation of Gasteromycetes from forms with exposed spore-bearing structures (Hymenomycetes) is correlated with repeated loss of forcible spore discharge (ballistospory). Diverse fruiting body forms and spore dispersal mechanisms have evolved among Gasteromycetes. Nevertheless, it appears that Hymenomycetes have never been secondarily derived from Gasteromycetes, which suggests that the loss of ballistospory has constrained evolution in these lineages.