The present invention relates to the resolution by preferential crystallization of potassium salts of racemic omeprazole which is a solvate of ethanol and/or of ethylene glycol, which consists in converting the omeprazole to the potassium salt in the form of a solvate or of a mixture of these solvates in the presence of an excess of inorganic base which is a source of potassium, the said potassium salts existing in the form of conglomerates, and in then resolving the said conglomerates, independently or simultaneously, by preferential crystallization in order to separate the two (S) and (R) enantiomers of these potassium salts of omeprazole.