A process for preparing Form A of (S)-5-methoxy-2-[[(4-methoxy-3,5-dimethyl-2-pyridinyl)-methyl]sulfinyl]-1H-benzimidazole magnesium dihydrate comprising crystallising or recrystallising crude (S)-5-methoxy-2-[[(4-methoxy-3,5-dimethyl-2-pyridinyl)-methyl]sulfinyl]-1H-benzimidazole magnesium dihydrate in the presence of ethyl acetate.