Allylic azide rearrangement is used in tandem with intramolecular azide鈥揳lkene cycloaddition to give a triazoline that when subsequently decomposed in the presence of a nucleophile gives piperidines. The tandem reaction gives two stereocenters that are generated with high control. The formation of the piperidines required the presence of innate conformational constraint. The applicability of the annulation reaction is demonstrated by the synthesis of iminosugars. A proposal is included to account for the observed stereoselectivity, which is influenced by the precursor structure.