The Gabriel synthesis uses phthalimide, a base, an alkyl halide, and hydrazine to make a 1° amine in a two-step process. First phthalimide is alkylated with an alkyl halide via an SN2 reaction, forming N-alkylphthalimide. Next, hydrazine attacks a carbonyl group of N-alkylphthalimide, resulting in the ring opening, followed by a proton transfer, and intramolecular attack of the other carbonyl by hydrazine’s terminal nitrogen to form a tetrahedral intermediate. A final proton transfer and breakdown of the tetrahedral intermediate gives the desired 1° amine and a cyclic phthalhydrazide by-product.