S-Adenosyl-L-methionine:tetrahydroprotoberberine cis-Nmethyltransferase (EC 2.1.1.122) catalyzes the conversion of (S)-stylopine to the quaternary ammonium alkaloid, (S)-cis-Nmethylstylopine, as a key step in the biosynthesis of protopine and benzophenanthridine alkaloids in plants. A full-length cDNA encoding a protein exhibiting 45 and 48% amino acid identity with coclaurine N-methyltransferase from Papaver somniferum (opium poppy) and Coptis japonica, respectively, was identified in an elicitor-treated opium poppy cell culture expressed sequence tag data base. Phylogenetic analysis showed that the protein belongs to a unique clade of enzymes that includes coclaurine N-methyltransferase, the predicated translation products of the Arabidopsis thaliana genes, At4g33110 and At4g33120, and bacterial S-adenosyl-L-methionine-dependent cyclopropane fatty acid synthases. Expression of the cDNA in Escherichia coli produced a recombinant enzyme able to convert the protoberberine alkaloids stylopine, canadine, and tetrahydropalmatine to their corresponding N-methylated derivatives. However, the protoberberine alkaloids tetrahydroxyberbine and scoulerine, and simple isoquinoline, benzylisoquinoline, and pavine alkaloids were not accepted as substrates, demonstrating the strict specificity of the enzyme. The apparent K m values for (R,S)-stylopine and S-adenosyl-L-methionine were 0.6 and 11.5 M, respectively. TNMT gene transcripts and enzyme activity were detected in opium poppy seedlings and all mature plant organs and were induced in cultured opium poppy cells after treatment with a fungal elicitor. The enzyme was detected in cell cultures of other members of the Papaveraceae but not in species of related plant families that do not accumulate protopine and benzophenanthridine alkaloids.