In the presence of a catalytic acid or base, a β-amino carbonyl compound (called a Mannich base) is generated from an amine (1°or 2°), a non-enolizable carbonyl, and an enolizable carbonyl compound. Under acidic conditions, the amine reacts with the protonated non-enolizable carbonyl compound, forming an iminium ion. The enolized carbonyl compound then attacks the iminium ion in an aldol-type reaction, affording the Mannich base.