Various approaches to the synthesis of 3-halopyrazolo[1,5-a]pyrimidines were studied. It is shown that the most effective strategy consists in the construction of the azoloazine core followed by halogenation with N-iodo- or N-bromosuccinimide. A series of 3-halopyrazolo[1,5-a]pyrimidines, which are bioisosteric analogs of natural purine nucleic bases and the drug Triazavirin®, were synthesized using this strategy. The obtained compounds are interesting as precursors of novel C-nucleosides, which can be synthesized by C-C-coupling with (pseudo)ribosides containing a keto group. © 2023, Springer Science+Business Media LLC.