A synthetic route towards 1-t-butoxycarbonyl-3-fluoro-3-methylpyrrolidine and 1-tbutoxycarbonyl-3-fluoro-3-methylazetidine, which are interesting building blocks for pharmaceutical compounds, is described. The key steps include a bromofluorination of appropriate alkenyl azides, followed by reduction to the corresponding amines and subsequent cyclization, yielding the 3-fluorinated azaheterocycles.