The present invention relates to a novel synthetic route for the preparation of raltegravir and pharmaceutically acceptable salts, starting from 2-amino-2-methylpropanenitrile and oxadiazole carbonyl chloride, through the formation of a pyrimidinone intermediate of formula (V).