Secondary metabolites can be toxic to the organism producing them; therefore gene clusters for biosynthesis of secondary metabolites often include genes responsible for the organism’s self-resistance to the toxic compounds. One such gene cluster is the compactin (ML-236B) cluster in Penicillium solitum. Compactin is an inhibitor of 3-hydroxy-3-methyl-glutaryl-CoA (HMG-CoA) reductase, and is used as a precursor for production of the cholesterol-lowering drug pravastatin. The compactin gene cluster includes two genes encoding proteins that may confer the self-resistance to compactin and its secretion . The mlcD gene encodes a putative ‘HMG-CoA reductase-like protein’, and mlcE encodes a putative efflux pump. However, the function of these two putative proteins has not yet been confirmed. We aim to elucidate the biological basis for compactin resistance in the compactin-producing organism. A codonoptimized version of the mlcD gene was inserted into the Saccharomyces cerevisiae genome. The constructed yeast strain was tested for sensitivity to lovastatin, a statin structurally similar to compactin, by growing the strain on media containing lovastatin. The strain showed an increased resistance to lovastatin compared to the wild-type strain. Furthermore, we investigated if MlcD confers the resistance by functional complementation of the endogenous HMG-CoA reductases in S. cerevisiae. There are two isozymes of HMG-CoA reductase in yeast, HMG1 and HMG2, both involved in the sterol biosynthetic pathway, which leads to the synthesis of ergosterol. Following deletion of HMG1 and HMG2 genes in S. cerevisiae, we inserted the mlcD gene into the knockout mutants, and tested the resulted strains for sensitivity to lovastatin. The HMG1 and HMG2 knockout mutants were unable to grow on minimal media and had an increased sensitivity to lovastatin on rich media. However, insertion of the mlcD gene restored the growth of the yeast mutants and increased their resistance to lovastatin. These results show that MlcD complements the activity of the deleted HMG-CoA reductases, enabling synthesis of ergosterol in yeast. In addition MlcD confers statin resistance by being insensitive to the inhibiting effects of statins.