The reaction of N-allyl-orth.9-vinylaniline with ruthenium carbene catalyst at 50 degrees C gives substituted 1,2-dihydroquinoline through ring-closing metathesis (RCM), which is easily converted to the corresponding quinoline after deprotection. In sharp contrast, when vinyloxytrimethylsilane is added to this reaction mixture, 1,2-dihydroquinoline is not formed and selective isomerization of N-allyl-ortho-vinylaniline is observed at 50 degrees C to give corresponding enamide, which is successfully converted to indole derivative by RCM. The same catalyst system provide indoline derivative at 160 degrees C by cycloisomerization. Based on a detailed mechanistic study, it becomes clear that a ruthenium carbene catalyst, which is highly effective for RCM, reacts with an electron-rich terminal olefin selectively, and another ruthenium species, which effectively catalyzes the isomerization of terminal olefin and cycloisomerization of alpha, omega-diene, is generated. (c) 2005 Elsevier B.V. All rights :reserved.