The present invention relates to novel 2-heteroaryl substituted benzothiophene and benzofuran derivatives, precursors thereof, and therapeutic uses of such compounds, having the structural formula (Ia) below: and to their pharmaceutically acceptable salt, compositions and methods of use. Furthermore, the invention relates to novel 2-heteroaryl substituted benzothiophene and benzofuran derivatives that are suitable for imaging amyloid deposits in living patients, their compositions, methods of use and processes to make such compounds. More specifically, the present invention relates to a method of imaging amyloid deposits in brain in vivo to allow antemortem diagnosis of Alzheimer's disease as well as measureing clinical efficacy of Alzheimer's disease therapeutic agents.