The invention relates to a new process useful in the preparation of pharmaceutical compounds such as 2-ethyl[3-(4-[(5-2-[(3-fluorophenyl)amino]-2-oxoethyl}-1H-pyrazol-3-yl)amino]quinazolin-7-yl}oxy)propyl]amino}ethyl dihydrogen phosphate (AZD1152) and intermediates used therein.