Although pyrimidines are not among the most reactive partners in intramolecular inverse-electron demand [4ps+2ps] reactions with alkynes, they could be activated under mild and practical conditions, leading to fused nitrogen-containing heterocycles. We report an optimized synthesis of a 5-iodo-7-aza-indazole by a one-pot Diels-Alder cascade that starts from a pyrimidine substituted in the 2-position by an (alkynyl)hydrazone. The safety of the process and the environmental impact were thoroughly evaluated. Eventually, a selection of crosscoupling reactions of 17 was studied and allowed the introduction of carbon-and nitrogen-based nucleophiles at the C5-position in good to excellent yields.