BackgroundThe terphenylquinones represent an ecologically remarkable class of basidiomycete natural products as they serve as central precursors of pigments and compounds that impact on microbial consortia by modulating bacterial biofilms and motility. This study addressed the phylogenetic origin of the quinone synthetases that assemble the key terphenylquinones polyporic acid and atromentin.ResultsThe activity of theHapalopilus rutilanssynthetases HapA1, HapA2 and ofPsilocybe cubensisPpaA1 were reconstituted in Aspergilli. Liquid chromatography and mass spectrometry of the culture extracts identified all three enzymes as polyporic acid synthetases. PpaA1 is unique in that it features a C-terminal, yet catalytically inactive dioxygenase domain. Combined with bioinformatics to reconstruct the phylogeny, our results demonstrate that basidiomycete polyporic acid and atromentin synthetases evolved independently, although they share an identical catalytic mechanism and release structurally very closely related products. A targeted amino acid replacement in the substrate binding pocket of the adenylation domains resulted in bifunctional synthetases producing both polyporic acid and atromentin.ConclusionsOur results imply that quinone synthetases evolved twice independently in basidiomycetes, depending on the aromatic α-keto acid substrate. Furthermore, key amino acid residues for substrate specificity were identified and changed which led to a relaxed substrate profile. Therefore, our work lays the foundation for future targeted enzyme engineering.Supplementary InformationThe online version contains supplementary material available at 10.1186/s40694-023-00162-1.