A novel class of 2-amino-4-nitropyrazolo[1,5-a]pyrimidines has been identified as potent inhibitors of coxsackievirus B3 replication. The synthesis of these compounds is based on the regioselective reaction of 3,5-diamino-5-nitropyrazole with unsymmetrical beta-diketones at catalysis by hydrochloric acid leading to 2-amino-4-nitropyrazolo[1,5-a]pyrimidines as key steps.