The formylation of 5-hydroxy-1,2,3,4-tetrahydroisoquinoline (I) with formamide (II) at 140 C gives N-formyl-5-hydroxy-1,2,3,4-tetrahydroisoquinoline (III), which is condensed with epichlorohydrin (IV) by means of NaOH in water yielding N-formyl-5-(2,3-epoxypropoxy)-1,2,3,4-tetrahydroisoquinoline (V). Finally, this compound is condensed with tert-butylamine (VI).