[Cl:1][C:2]1[CH:7]=[CH:6][N:5]2[N:8]=[CH:9][CH:10]=[C:4]2[N:3]=1.O=P(Cl)(Cl)Cl.CN([CH:19]=[O:20])C>>[Cl:1][C:2]1[CH:7]=[CH:6][N:5]2[N:8]=[CH:9][C:10]([CH:19]=[O:20])=[C:4]2[N:3]=1To 5-chloropyrazolo[1,5-a]pyrimidine (5.0 g, 32.5 mmol) in DMF was added POCl3 (7.5 mL, 81.2 mmol). The mixture was stirred at room temperature overnight. Ice was added to quench POCl3, then the mixture was neutralized with 1M NaOH. The resulting yellow precipitate was filtered and dried to yield 4.85 g (82% yield) of 5-chloropyrazolo[1,5-a]pyrimidine-3-carbaldehyde as yellow solid. LCMS (M+1=182)