The first two steps of aflatoxin biosynthesis are catalyzed by the HexA/B and by the Pks protein. The phylogenetic analysis clearly distinguished fungal HexA/B from FAS subunits and from other homologous proteins. The phylogenetic trees of the HexA and HexB set of proteins share the same clustering. Proteins involved in the synthesis of fatty acids or in the aflatoxin or sterigmatocystin biosynthesis cluster separately. The Pks phylogenetic tree also differentiates the aflatoxin-related polypeptide sequences from those of other kinds of secondary metabolism. The function of some of the A. flavus Pks homologues may be deduced from the phylogenetic analysis. The conserved sequence motifs of protein domains shared by HexA/B and Pks - namely, β-polyketide synthase (KS), acetyl transferase (AT) and acyl carrier protein (ACP) - have been identified, and the HexA/B and Pks involved in aflatoxin biosynthesis have been distinguished from those involved in primary metabolism or other kinds of secondary metabolism.