Thermolysis of azidocinnamates with an olefinic o-substituent gives products (isoquinolines, azepines, aziridines) formed by selective interaction of the azide, and the derived nitrene, with the olefinic substituent, cyclisation onto the unsubstituted aromatic ortho position now being a minor reaction. However when this interaction is removed by epoxidation of the alkene, cyclisation occurs exclusively to the aromatic ring to give 4-substituted indoles in high yield. Thus o-vinyl azidocinnamate (1a) gives isoquinoline (5a), and (1b) gives isoquinoline (5b) together with the 3-benzazepine (7); o-allyl azidocinnamate (2a) gives indole (12), the 3-benzazepine (13), and the tricyclic aziridines (14) and (15), and (2b) gives an analogous mixture of products from which only the indole (19) was isolated. A mechanism is proposed (Scheme 2) in which the azide partitions itself between intramolecular cycloaddition to the double bond and loss of nitrogen to give the azirine-nitrene equilibrium. This rationalises the formation of the 4 temperature-dependent products from azidocinnamate (2a), the aziridine (15) involving an intramolecular ene reaction of the imine bond. Thermolysis of the epoxy-azidocinnamates (3) and (4) gives indoles (20) and (21) respectively in high yield; treatment of (3) with triethyl phosphite gives the aziridine (8), presumably by formation of an iminophosphorane and intramolecular nucleophilic attack by this on the epoxide, the counterpart of a known intermolecular reaction.