Based on structures determined by X-ray crystallography, ab initio MP2 calculations on type A mesoionic rings give geometries in good agreement with observed values. A study of four mesoionic ring systems, each with exocyclic oxygen, nitrogen or carbon groups, shows that the presence and configuration of exocyclic lone pairs significantly influences the geometry and configurational preference. Using a localised bond model and NBO analysis, these effects are rationalised in terms of an anomeric interaction of lone pairs with the antibonding orbitals of adjacent σ bonds. In agreement with experiment, similar effects are calculated for pyran-2-imines.