Reactions of 2-methyl-1,2,5-oxodiazolium perchlorate salts and 1-methyl-2-aryl-1,2,3-triazolium perchlorate salts with the bases KCN, NaOEt, KOBut, LiNPr2i, give ring expansions to substituted 1,2,5-oxadiazines and 1,2,4-triazines. With cyanide as base the reactions follow an addition-elimination pathway and in two cases the addition intermediate has been isolated or directly detected by low-temperature NMR spectroscopy. The oxadiazolium system with cyanide also gives a useful new route to alpha-cyano nitrones via a ring degradation which competes with ring expansion. The reactions with KOBut and LiNPr2i do not involve an addition of the base to the azolium salt. Reactions have been monitored by C-13 NMR spectroscopy by using (CN-)-C-13. An X-ray crystal structure is reported for (E)-N-(alpha-cyanobenzylidene)methylamine N-oxide.