An efficient synthesis of medium-sized heterocyclic rings was achieved using a one-pot aza-Wittig/retro-aza-Claisen sequence of vinyl cyclobutanecarboxaldehydes derived from simple allylic carbonates. The use of various Staudinger reagents in the aza-Wittig reaction allows for a variety of N-substituted products to be obtained. The rearrangement is under thermodynamic control driven by relief of the cyclobutane ring strain and resonance stabilization of the resulting vinylogous amide/sulfonamide.