The intramolecular Heck cyclization of N-allyl, -aryl- or -benzyl-5-allyl-2-pyrrolidinones and N-allyl- -aryl- or -benzyl-6-allyl-2-piperidinones (1a-f), prepared through allyltrimethylsilane addition to the corresponding cyclic N-acyliminium ions, afforded indolizidinones (3a, 5a, 5b), quinolizidinones (3b, 4b) and benzoazepinones (7a, 8a, 7b, 8b) in moderate to good yields (56-90%). Exclusive exo-trig over endo-trig mode of cyclization was observed in all examples investigated. and it was accompanied by double bond migration. which precluded our attempts of a one-pot tandem Diels-Alder cycloaddition with dienophiles such as maleic anhydride, methyl vinyl ketone and diethyl azodicarboxy late. Catalytic hydrogenation of a 2:1 mixture of regioisomeric indolizidinones 5a-5b afforded the stereoisomerically enriched cis indolizidinone 6a (20:1 mixture) in quantitative yield. A similar behavior was observed in the catalytic hydrogenation of regioisomeric benzoazepinones 7b-8b.