The cyclization of functionalized aminophosphonates is studied on both experimental and theoretical grounds. In a recently described route to phosphono-β-lactams [Stevens C. V.; Vekemans, W.; Moonen, K.; Rammeloo, T. Tetrahedron Lett. 2003, 44, 1619], it was found that starting from an ambident allylic anion only four-membered rings were formed without any trace of six-membered lactams. New anion trapping experiments revealed that the γ-anion is highly reactive in intermolecular reactions. Ab initio calculations predict higher reaction barriers for the γ-anion due to restricted rotation about the C−N bond and due to highly strained transition states during ring closure. The sodium or lithium counterion, explicit dimethyl ether solvent molecules, and bulk solvent effects were properly taken into account at various levels of theory.