In the title compound, C20H18N2O3, the β-lactam ring is essentially planar, having a maximum deviation of 0.0291 (15) Å for the N atom, and perpendicular to the phenyl ring [dihedral angle = 85.55 (11)°]. The carbonitrile side chain is almost linear, the C—C—N angle being 176.8 (2)°. The crystal packing is stabilized by intermolecular O—H⋯O and C—H⋯O interactions.