The invention relates to a process for the preparation of zaleplon (N-[3(3-cyanopyrazolo[1,5-a]pyrim-idin-7-yl)phenyl]-N-ethyl-accramide) in the reaction of 3-dimethylamino-1-(3-N-ethyl-N-acetylamirnophenyl)-2-propen-1-one with 3-aminopyrazole-4-carbonitrile, which comprises carrying out said reaction in an aqueous solution of formic acid at formic acid concentrations in the range of 20 80% (w/w). Zaleplon is useful as an anxiolytic, a sedactive and a skeletal muscle relaxant.