The insecticidal loline alkaloids, produced by Neotyphodium uncinatum and related endophytes, are exo-1-aminopyrrolizidines with an ether bridge between C-2 and C-7. Loline alkaloids vary in methyl, acetyl, and formyl substituents on the 1-amine, which affect their biological activity. Enzymes for key loline biosynthesis steps are probably encoded by genes in the LOL cluster, which is duplicated in N. uncinatum, except for a large deletion in lolP2. The role of lolP1 was investigated by its replacement with a hygromycin B phosphotransferase gene. Compared to wild type N. uncinatum and an ectopic transformant, DeltalolP1 cultures had greatly elevated levels of N-methylloline (NML) and lacked N-formylloline (NFL). Complementation of DeltalolP1 with lolP1 under control of the Emericella nidulans trpC promoter restored NFL production. These results and the inferred sequence of LolP1 indicate that it is a cytochrome P450, catalyzing oxygenation of an N-methyl group in NML to the N-formyl group in NFL.