Spinosyns are glycosylated polyketide-derived macrolides possessing a perhydro-as-indacene core that is presumably formed via a series of intramolecular cross-bridging reactions. The unusual structure of the spinosyn aglycone suggests an intriguing biosynthetic pathway for its formation, which is expected to be initiated by the oxidation of the 15-OH group of the mature polyketide precursor and may involve a Diels-Alder-type [4 + 2] cycloaddition reaction. Three possible routes, which differ in the order of oxidation and cyclization events, can be envisioned for the biosynthesis of the core structure. Sequence analysis of the spinosyn biosynthetic gene cluster led to the speculation of spnJ as the possible oxidase gene. To explore the early stage of intramolecular ring formation, we cloned and expressed the spnJ gene and purified the SpnJ protein which shows the characteristics of flavoproteins. Two possible substrates for SpnJ, the linear mature polyketide precursor and the corresponding cyclized macrolactone, were also synthesized. TLC and HPLC analysis of the incubation mixture of these compounds with SpnJ revealed that only the synthesized macrolactone could be converted to the corresponding ketone. This result clearly indicated that macrolactone formation proceeds 15-OH oxidation since the linear polyketide is not a substrate for SpnJ. The experiments described herein detail a convergent synthesis of spinosyn macrolactone and validate the catalytic function of SpnJ as a flavin-dependent oxidase. More significantly, we have established the spinosyn macrolactone as the immediate precursor of the tricyclic nucleus of spinosyns.