Disclosed is a process for preparing 3-[2-[4-(6-fluoro-1,2-benzisoxazol-3-yl)-1-piperidinyl]ethyl]-6,7,8,9-tetrahydro-9-hydroxy-2-methyl-4H-pyrido[1,2-a]pyrimidin-4-one comprising: a) preparing 3-(2-chloroethyl)-6,7,8,9-tetrahydro-9-hydroxy-2-methyl-4H-pyrido[1,2-a]pyrimidin-4-one comprising reacting 3-(2-chloroethyl)-2-methyl-9-(phenylmethoxy)-4H-pyrido[1,2-a]pyrimidin-4-one or 3-(2-chloroethyl)-2-methyl-9-hydroxy-4H-pyrido[1,2-a]pyrimidin-4-one with hydrogen and a hydrogenation catalyst in an acidic medium to form 3-(2-chloroethyl)-6,7,8,9-tetrahydro-9-hydroxy-4H-pyrido[1,2-a]pyrimidin-4-one, removing the acidic media from step (i) and isolating 3-(2-chloroethyl)-6,7,8,9-tetrahydro-9-hydroxy-4H-pyrido[1,2-a]pyrimidin-4-one with a solvent selected from the group consisting of ketones, alcohols, water, hydrocarbons and mixtures thereof b) reacting 3-(2-chloroethyl)-6,7,8,9-tetrahydro-9-hydroxy-2-methyl-4H-pyrido[1,2-a]pyrimidin-4-one with 6-fluoro-3-(4-piperidinyl)-1,2-benzisoxazole·HCI in the presence of a base and an inert solvent selected from the group consisting of alcohols, ketones, esters, ethers, hydrocarbons and mixtures thereof c) removing the solvent from step (b) and d) isolating paliperidone from a solvent selected from the group consisting of ketones, alcohols, water, hydrocarbons and mixtures thereof.