N-(Phenoxymethyl)-and N-(phenylthiomethyl)-benzotriazoles are versatile substrates for the preparation of benzofurans and benzothiophenes by insertion reactions of their anions into alkyl and aryl aldehydes and in situ cyclization of the α-aryloxy and α-arylthio ketones thus formed. N-(Naphthyloxy)-and N-(naphthylthio)-benzotriazoles are similarly efficient precursors for naphthofurans and naphthothiophenes.