Photolysis of triazolo [1,5-b]pyridazine 8 isolated in Ar matrix generates diazomethylpyridazines 9Z and 9E and diazopentenynes 11Z and 11E as detected by IR spectroscopy. ESR spectroscopy detected the 3-pydidazylcarbene 10 as well as pent-2-en-3-yn-1-ylidene 12 formed by loss of one and two molecules of N 2 , respectively. Further photolysis caused rearrangement of the carbenes to 1,2-pentadien-4-yne 13 and 3-ethynylcyclopropene 14. Flash vacuum thermolysis (FVT) of 8 at 400-500°C with Ar matrix isolation of the products yielded 13, 14, and 1,4-pentadiyne 15. At higher temperatures, glutacononitriles 27Z and 27E were formed as well together with minor amounts of 2-and 3-cyanopyrroles 28 and 29. Tetrazolo[1,5-a]pyridine/2-azidopyridine 22T/22A yields 2-pyridylnitrene 19 as well as the novel open-chain cyanodienylnitrene 23 and the ring-expanded 1,3-diazacyclohepta-1,2,4,6-tetraene 21 on short wavelength photolysis. Nitrenes 19 and 23 were detected by ESR spectroscopy, and cumulene 21 by IR and UV spectroscopy. FVT of 22T/22A also affords 2-pyridylnitrene 19 and diazacycloheptatetraene 21, as well as glutacononitriles 27Z,E and 2-and 3-cyanopyrroles 28 and 29. Photolysis of 21 above 300 nm yields the novel spiroazirene 25, identified by its matrix IR spectrum. The reaction pathways connecting the four carbenes (10Z,E and 12Z,E) and three nitrenes (19, 23EZ, and 23ZZ) in their open-shell singlet and triplet states are elucidated with the aid of theoretical calculations at DFT, CASSCF, and CASPT2 levels. Three possible mechanisms of ring-contraction in arylnitrenes are identified: (i) via ring-opening to dienylnitrenes, (ii) concerted ring-contraction, and (iii) via spiroazirenes 25, whereby (i) is the energetically most favorable.