The Gabriel synthesis is an organic reaction used to convert an alkyl halide to a primary amine using phthalimide with base and followed by hydrazine. The reaction begins with the deprotonation of the phthalimide which then attacks the alkyl halide in an SN2 fashion to give an N-alkylphthalimide intermediate. The intermediate is then cleaved by hydrazine in a series of steps that end with the liberation of the final primary amine product and phthalhydrazide by-product.
Gabriel, S. Ber. Dtsch. Chem. Ges. 1887, 20, 2224–2236.