text: For imides derived from ammonia, the N–H center is weakly acidic. Thus, alkali metal salts of imides can be prepared by conventional bases such as potassium hydroxide. The conjugate base of phthalimide is potassium phthalimide. These anion can be alkylated to give N-alkylimides, which in turn can be degraded to release the primary amine. Strong nucleophiles, such as potassium hydroxide or hydrazine are used in the release step.
  Treatment of imides with halogens and base gives the N-halo derivatives. Examples that are useful in organic synthesis are N-chlorosuccinimide and N-bromosuccinimide, which respectively serve as sources of "Cl" and "Br" in organic synthesis.