5-Bromobenzothiophene-2-carboxylic acid methyl ester is used in the preparation of new derivatives of (heterocycle-tetrahydropyridine)-(piperazinyl)-1-alkanone and (heterocycle-dihydropyrrolidine)-(piperazinyl)-1-alkanone, as p75 neurotrophin receptor ligands for treating neurological and neurodegenerative diseases.