The pyramidal inversion mechanisms of the 6-methoxy and the 5-methoxy tautomers of (S)-omeprazole were studied, employing ab initio and DFT methods. The conformational space of the model molecule (S)-2-[(3-methyl-2-pyridinyl)methyl]sulfinyl-1H-benzimidazole was calculated, with respect to rotations around single bonds, at the B3LYP/6-311G(d,p) level. All of the resulting conformations were used as starting points for full optimizations of (S)-omeprazole, at B3LYP/6-31G(d), B3LYP/6-311G(d,p), B3LYP/6-311++G(d,p), B3LYP/6-311G(2df,2pd), MP2/6-31G(d), and MP2/6-311G(d,p) levels. Four distinct pathways were found for enantiomerization via the pyramidal inversion mechanism for each of the tautomers of (S)-omeprazole. Each transition state, in which the sulfur, the oxygen and the two carbon atoms connected directly to the sulfur are in one plane, connects two diastereomeric minima. The enantiomerization is completed by free rotation around the sulfur-methylene bond, and around the methylene-pyridine ring bond. The effective Gibbs' free energy barrier for racemization DeltaG(double dagger) (rac) of the two tautomers of (S)-omeprazole are 39.8 kcal/mol (5-methoxy tautomer) and 40.0 kcal/mol (6-methoxy tautomer), indicating that the enantiomers of omeprazole are stable at room temperature (in the gas phase). The 5-methoxy tautomer of (S)-omeprazole was found to be slightly more stable than the 6-methoxy tautomer, in the gas phase. The energy barrier (DeltaG(++)) for the(S,M) <=>(S,P) diastereomerization of (S)-omeprazole due to the rotation around the pyridine chiral axis was very low, 5.8 kcal/mole at B3LYP/6-311G(d,p).