The construction of a three-dimensional molecular model of the fungal form of cytochrome P450 (CYP51) from Saccharomyces cerevisiae, based on homology with the haemoprotein domain of CYP102 from Bacillus megaterium (a unique bacterial P450 of known crystal structure) is described. It is found that the endogenous substrate, lanosterol, can readily occupy the putative active site of the CYP51 model such that the known mono-oxygenation reaction, leading to C14-demethylation of lanosterol, is the preferred route of metabolism for this particular substrate. Key amino acid contacts within the CYP51 active site appear to orientate lanosterol for oxidative attack at the C14-methyl group, and the position of the substrate relative to the haem moiety is consistent with the phenyl-iron complexation studies reported by Tuck et al. [J. Biol. Chem., 267, 13175-13179 (1992)]. Typical azole inhibitors, such as ketoconazole, are able to fit the putative active site of CYP51 by a combination of haem ligation, hydrogen bonding, pi-pi stacking and hydrophobic interactions within the enzyme's haem environment. The mode of action of azole antifungals, as described by the modelling studies, is supported by quantitative structure-activity relationship (QSAR) analyses on two groups of structurally related fungal inhibitors. Moreover, the results of molecular electrostatic isopotential (EIP) energy calculations are compatible with the proposed mode of binding between azole antifungal agents and the putative active site of CYP51, although membrane interactions may also have a role in the antifungal activity of azole derivatives.