4-alkylpyrimidine is produced by reacting formamide with a formyl methyl alkyl ketone diacetal without the addition of water at a temperature that allows removal of the 4-alkylpyrimidine from the reaction mixture by distillation. The process is readily applicable on an industrial scale and succeeds without the addition of water or ammonium chloride as a catalyst and permits the production of 4-alkylpyrimidine in good yields and excellent purities without time-consuming extraction steps.