Rearrangement of 4-(1-haloalkyl)- and 4-(2-haloalkyl)-2-azetidinones into methyl omega-alkylaminopentenoates via transient aziridines and azetidines.