[N:1]([O-:3])=O.[Na+].[CH3:5][C:6]1[CH:7]=[C:8]2[N:13]([C:14]=1[C:15]([O:17][CH3:18])=[O:16])[CH:12]=[CH:11][CH:10]=[CH:9]2>O.C(O)(=O)C>[CH3:5][C:6]1[C:7]([N:1]=[O:3])=[C:8]2[N:13]([C:14]=1[C:15]([O:17][CH3:18])=[O:16])[CH:12]=[CH:11][CH:10]=[CH:9]2A solution of sodium nitrite (2.2 g, 31.90 mmol) in water (10 mL) was added slowly at 0-5° C. to a stirred solution of methyl 2-methylindolizine-3-carboxylate 2 (3.9 g, 20.61 mmol) in glacial acetic acid (50 mL). After 30 min, the brown reaction mixture was poured into water. Green crystals were collected by filtration, washed with water and then dried under vacuum to give 3.7 g of expected compound; m.p.: 131-132° C. 1H NMR (CDCl3): 9.63 (d, J=7.0 Hz, 1H), 8.39 (d, J=8.5 Hz, 1H), 7.74-7.69 (m, 1H), 7.23-7.18 (m, 1H), 4.03 (s, 3H), 3.26 (s, 3H), 13C NMR (CDCl3): δ 162.5, 154.5, 141.7, 135.7, 127.9, 123.2, 118.4, 118.3, 114.5, 51.7, 11.1. Analysis calculated for C11H10N2O3: C, 60.55; H, 5.54; N, 12.84, found: C, 60.65; H, 5.60; N, 12.90.