The synthesis of substituted 1-benzyl-1H-pyrrolo[2,3-b]pyridines and 5-benzyl-5H-pyrrolo-[2,3-b]pyrazines has been performed by cycloisomerization of the corresponding N-benzyl-3-alkynyl-5-arylpyridin(or pyrazin)-2-yl amines with AuCl 3 . Alkynylamines have been obtained starting from 3-bromo-5-substituted N-(pyridin-or pyrazin-2-yl)pyridinium aminides in a regioselective way.