The three-membered ring in 2-(2-pyridyl)azirine-2-carboxylic esters and thioesters can undergo selective cleavage of either the N-C2 bond under copper(II) catalysis or the C-C bond under the action of HCl to provide isomeric azirine ring expansion products of pyrazolo[1,5-a]pyridine or imidazo[1,5-a]pyridine series, respectively. Mild catalytic reaction conditions for the formation of pyrazolopyridines make it possible to obtain them directly from 4-bromoisoxazoles by a one-pot, three-stage procedure without isolating the intermediate 2-bromoazirines and 2-(2-pyridyl)azirines.