An improved process for preparing tetrahydroquinolines and related compounds especially 5,6,7,8-tetrahydroquinoline-8-nitriles, amides and thioamides is described. The nitriles and thioamides are anti-ulcer and/or anti-secretory agents. Typically a compound of formula A ##STR1## where M is sodium, potassium, lithium or MgHal where Hal is chlorine, bromine or iodine, is reacted, e.g., in an ether solvent, with a silyl compound R.sub.x.sup.a Si(NCY).sub.4-x (III) wherein R.sup.a is alkyl, cycloalk...