A series of novel 3-methylphosphonylated [1,2,4]triazolo[4,3-a]pyridines was accessed through a 5-exo-dig-type cyclization of chloroethynylphosphonates and commercially available N-unsubstituted 2-hydrazinylpyridines. In addition, 3-methylphosphonylated [1,2,4]triazolo[4,3-a]quinolines and 1-methylphosphonylated [1,2,4]triazolo[3,4-a]isoquinolines were synthesized in a similar manner. The presence of a NO2 group in the starting hydrazinylpyridine induces a Dimroth-type rearrangement leading to 2-methylphosphonylated [1,2,4]triazolo[1,5-a]pyridines.