Fungal polyketide biosynthesis typically involves multiple enzymatic steps and the encoding genes are often found in gene clusters. A gene cluster containing PKS12, the polyketide synthase gene responsible for the synthesis of the pigment aurofusarin, was analysed by gene replacement using Agrobacterium tumefaciens-mediated transformation to determine the biosynthesis pathway of aurofusarin. Replacement of aurR1 with hygB shows that it encodes a positively acting transcription factor that is required for the full expression of PKS12, aurJ, aurF, gip1 and FG02329.1, which belong to the gene cluster. AurR1 and PKS12 deletion mutants are unable to produce aurofusarin and rubrofusarin. Bio- and chemoinformatics combined with chemical analysis of replacement mutants (Delta aurJ, Delta aurF, Delta gip1, Delta aurO and Delta PKS12) indicate a five-step enzyme catalysed pathway for the biosynthesis of aurofusarin, with rubrofusarin as an intermediate. This links the biosynthesis of naphthopyrones and naphthoquinones together. Replacement of the putative transcription factor aurR2 results in an increased level of rubrofusarin relative to aurofusarin. Gip1, a putative laccase, is proposed to be responsible for the dimerization of two oxidized rubrofusarin molecules resulting in the formation of aurofusarin.