The intramolecular cyclization of keto-stabilized sulfoniumylides obtained from β-alanine and containing various imide fragments was studied. On heating in toluene in the presence of PhCO2H, ylides containing a phthalimide moiety are converted into indolizidine-2,6-dione derivatives, whereas those incorporating a 4-methyl-1,2,3,6-tetrahydrophthalimide or pyrrolidine-2,5-dione moieties do not undergo