Halocyclization of mesylates or tosylates of 2-(cycloalk-2-en-1-yl)anilines gives N-methanesulfonyl-or N-toluenesulfonyl-1-halo-1,2,3,4,4a,9a- hexahydrocarbazoles, heating of which in DMF at 160°C or in piperidine at 110°C leads to 4,4a,9,9a-tetrahydro-3H-carbazoles. Heating N-methanesulfonyl-1-iodo-1,2,3,3a,4,8b-hexahydrocyclopenta[b]indole in DMF at 180-200°C gives 1,3a,4,9b-tetrahydrocyclopenta[b]indole, while in the presence of an ortho-methyl substituent the dehydroiodination reaction proceeds in piperidine at 110°C in high yield. The effect of the nature of the ortho substituent of N-methyl-1-iodo-1,2,3,3a,4,8b-hexahydrocyclopenta[b]indole on the conformational equilibrium of the cyclopentane ring has been established by 1H NMR spectroscopy. © 2006 Springer Science+Business Media, Inc.