The heterocyclic hydrazine derivatives N-aminopyrrole, H2N-NC4H4, and N-aminopiperidine, H2N-NC5H10, reacted with the hydrides H-Al(CMe3)2 or GaH3NMe2Et by the release of elemental hydrogen and the formation of the corresponding aluminum and gallium hydrazides. These products are dimerized in the solid state via Al-N-Al or Ga-N-Ga bridges and possess four-membered E2N2 heterocycles with two exocyclic N-N bonds.