Lichenized fungi synthesize a great variety of secondary metabolites. These are typically crystalline compounds, which are deposited extracellularly on the fungal hyphae. While we know a lot about the chemical properties and structures of these substances, we have very little information on the molecular background of their biosynthesis. In the current study we analyze the diversity of non-reducing polyketide synthase (PKS) genes in members of the lichenized Pertusariales. This order primarily contains fully oxidized secondary metabolites from different substance classes, and is chemically and phylogenetically well studied. Using a degenerate primer approach with subsequent cloning we detected up to five non-reducing PKS sequences in a single PCR product. Eighty-five new KS sequence fragments were obtained for this study. Analysis of the 157 currently available fungal KS sequence fragments in a Bayesian phylogenetic framework revealed 18 highly supported clades that included only lichenized taxa, only non-lichenized taxa, or both. Some Pertusarialean groupings of PKS sequences corresponded partly to phylogenetic groupings based on ribosomal DNA. This is reasonable, because a correlation between well-supported phylogenetic lineages and the occurrence of secondary metabolites in the Pertusariales has been observed before. However, no clear linkage was found between the PKS genes analyzed and the ability to produce a particular secondary substance. Several PKS clades did not reveal obvious patterns of secondary compound distribution or phylogenetic association. Compared with earlier phylogenetic analyses of KS sequences the increased sampling in the current study allowed us to detect many new groupings within the fungal non-reducing PKSs.