Cyclic alkoxyguanidines such as 2-methoxyiminoimidazolidine, 2-benzyloxyiminoimidazolidine and 6',7'-dihydro-5' H-spiro(cyclohexane-1,3'-imidazo(2,1-c)(1,2,4)oxadiazole react with isocyanates and isothiocyanates to give the corresponding urea and thiourea derivatives, which under basic reaction conditions undergo an intramolecular SN2σ nucleophilic substitution reaction at the sp 2 nitrogen atom of the alkoxyimine moiety with simultaneous extrusion of the alkoxy anion leading to the formation of imidazo(2,1-c)(1,2,4)triazol-3-one and imidazo(2,1- c)(1,2,4)thiadiazole with new N-N and N-S bonds, respectively. The above extensions of the Boulton-Katritzky rearrangement were studied theoretically with the DFT B3LYP-6-31+G* method and SM8 solvation model.