O[C:2]1[CH:7]=C(O)[N:5]2[N:9]=[C:10]([C:12]([O:14][CH2:15][CH3:16])=[O:13])[CH:11]=[C:4]2[N:3]=1.P(Cl)(Cl)([Cl:19])=O.C(=O)(O)[O-].[Na+].[CH:27]([Cl:30])(Cl)Cl>>[Cl:19][C:2]1[CH:7]=[C:27]([Cl:30])[N:5]2[N:9]=[C:10]([C:12]([O:14][CH2:15][CH3:16])=[O:13])[CH:11]=[C:4]2[N:3]=1A suspension of ethyl 5,7-dihydroxypyrazolo[1,5-a]pyrimidine-2-carboxylate (9.59 g, 43.0 mmol) and phosphorous oxychloride (20.0 mL, 215 mmol) was refluxed for 1 hr. After being cooled to ambient temperature, the reaction mixture was poured into saturated sodium bicarbonate and chloroform. The organic layer was separated and aqueous layer was extracted with chloroform. The organic layer was combined and concentrated in vacuo to give ethyl 5,7-dichloropyrazolo[1,5-a]pyrimidine-2-carboxylate. MS (APCI): m/z 260/262 (M+H).