Enamine formation is an acid-catalyzed reversible reaction with two parts to its mechanism: The formation of carbinolamine and its subsequent conversion to enamine. Carbinolamine formation begins with the nucleophilic attack of the amine to form a dipolar intermediate. The mildly acidic ammonium ion protonates the negatively charged oxygen atom, followed by deprotonation of the nitrogen atom to give the carbinolamine. Next, the hydroxyl group is converted into water such that a subsequent loss of the water molecule forms the iminium ion. Finally, deprotonating the α hydrogen forms a new C=C π bond with the subsequent transfer of the C=N π electrons to nitrogen to generate the enamine. Both enamine and imine formation mechanisms are identical, involving three key reaction types: Nucleophilic attack, proton transfer, and loss of leaving group. The last step, however, is different. Abstracting the N–H proton gives an imine, while abstracting the C–H proton gives an enamine.