Maytansinoids are potent antitumor agents found in plants and microorganisms. To elucidate their biosynthesis at the biochemical and genetic level and to set the stage for their structure modification through genetic engineering, we have cloned two gene clusters required for the biosynthesis of the maytansinoid, ansamitocin, from a cosmid library of Actinosynnema pretiosum ssp. auranticum ATCC 31565. This is a rare case in which the genes involved in the formation of a secondary metabolite are dispersed in separate regions in an Actinomycete. A set of genes, asm22-24, asm43-45, and asm47, was identified for the biosynthesis of the starter unit, 3-amino-5-hydroxybenzoic acid (AHBA). Remarkably, there are two AHBA synthase gene homologues, which may have different functions in AHBA formation. Four type I polyketide synthase genes, asmA-D, followed by the downloading asm9, together encode eight homologous sets of enzyme activities (modules), each catalyzing a specific round of chain initiation, elongation, or termination steps, which assemble the ansamitocin polyketide backbone. Another set of genes, asm13-17, encodes the formation of an unusual ''methoxymalonate'' polyketide chain extension unit that, notably, seems to be synthesized on a dedicated acyl carrier protein rather than as a CoA thioester. Additional ORFs are involved in postsynthetic modifications of the initial polyketide synthase product, which include methylations, an epoxidation, an aromatic chlorination, and the introduction of acyl and carbamoyl groups. Tentative functions of several asm genes were confirmed by inactivation and heterologous expression.