Overall reaction
Phthalimide → (KOH) potassium phthalimide → (R–X) N-alkylphthalimide → (N₂H₄ or H₃O⁺) R–NH₂
Phthalimide as a protected NH₂: primary amines without over-alkylation.
The Gabriel synthesis makes pure primary amines. Phthalimide is deprotonated (its N–H, between two carbonyl groups, has pKa about 8.3), the anion is alkylated by a primary alkyl halide in an SN2 reaction, and hydrazine (or hydrolysis) then releases the amine. Because the N-alkylphthalimide cannot be alkylated again, no secondary or tertiary amines form.
Phthalimide → (KOH) potassium phthalimide → (R–X) N-alkylphthalimide → (N₂H₄ or H₃O⁺) R–NH₂
Phthalimide as a protected NH₂: primary amines without over-alkylation.
Each step is checked electron by electron: the curly arrows give exactly the structures drawn.
The alkylation step is SN2, and aryl halides do not undergo nucleophilic substitution by the phthalimide anion.
The N–H sits between two carbonyl groups, so the anion is delocalised onto both oxygens (pKa ≈ 8.3).
Ammonia gives mixtures of primary, secondary and tertiary amines and quaternary salts; the N-alkylphthalimide stops at one alkyl group.
The button above opens the complete figure — overall reaction, numbered mechanism and key points — as ordinary editable structures. Change substituents, recolour atoms, or export a PNG, SVG or chemfig code for notes and slides. The same figure is in the Templates panel under Name reactions.