The reaction of two nitrophthalodinitriles with diazomethane is descri
bed. If the nitro group is at position 3, only one of the two nitrile
functions reacts giving three isomeric N-methyl 1,2,3-triazoles. In co
ntrast, if the nitro group is at position 4, both nitriles react, each
producing a 2-N-methyl 1,2,3-triazole. The reactivity was accounted f
or in terms of electronic densities, which were determined for several
nitrile compounds. Interestingly, for 4-nitrophthalodinitrile, origin
al methylation of the aromatic ring at position 5 was also observed.