Several tetrazolo[1,5-a]pyridines/2-azidopyridines undergo photochemical nitrogen elimination and ring expansion to 1,3-diazacyclohepta-1,2,4,6-tetraenes, as well as ring cleavage to cyanovinylketenimines, in low temperature Ar matrices. 6,8-Dichlorotetrazolo[1,5-a]pyridine/2-azido-3,5-dichloropridine undergoes ready exchange of the chlorine in position 8 (3) with ROH/RONa. 8-Chloro-6-trifluoromethyltetrazolo[1,5-a]pyridine undergoes solvolysis of the CF(3) group to afford 8-chloro-6-methoxycarbonyltetrazolo[1,5-a]pyridine. Several tetrazolopyridines/2-azidopyridines afford 1H- or 5H-1,3-diazepines in good yields on photolysis in the presence of alcohols or amines. 5-Chlorotetrazolo[1,5-a]pyridines/2-azido-6-chloropyridines and undergo a rearrangement to 1H- and 3H-3-cyanopyrroles and, respectively. The mechanism of this rearrangement was investigated by (15)N-labelling and takes place via transient 1,3-diazepines. The structures of 6,8-dichloro-tetrazolo[1,5-a]pyridine, 6-chloro-8-ethoxytetrazolo[1,5-a]pyridine, dipyrrolylmethane, and 2-isopropoxy-4-dimethylamino-5H-1,3-diazepine were determined by X-ray crystallography. In the latter case, this represents the first reported X-ray crystal structure of a 5H-1,3-diazepine.