[2][3] The Mannich reaction starts with the nucleophilic addition of an amine to a carbonyl group followed by dehydration to the Schiff base.
[4]: 140 In the Mannich reaction, primary or secondary amines or ammonia react with formaldehyde to form a Schiff base.
The mechanism of the Mannich reaction starts with the formation of an iminium ion from the amine and formaldehyde.
[4]: 140 The compound with the carbonyl functional group (in this case a ketone) will tautomerize to the enol form, after which it attacks the iminium ion.
On methyl ketones, the enolization and the Mannich addition can occur twice, followed by an β-elimination to yield β-amino enone derivatives.