A process of producing the magnesium salt of an enantiomer of omeprazole, said process comprising the steps of: i) reacting magnesium with a lower alcohol to produce magnesium alkoxide in solution in the lower alcohol as solvent, ii) adding the neutral form of the enantiomer of omeprazole to the solution, and iii) flash-evaporating the solvent.