Abstract For the synthesis of precursors to cellulose-based ion exchange materials, the condensation of diaminomaleonitrile with 2, 4-pentanedione and 2, 5-hexanedione was explored. Whilst the former diketone yielded the expected 1, 4-diazepine (2), the latter gave either a pyrrole derivative (3) or an unusual triazabicyclononene (4), depending on the conditions used. Compound 2 crystallizes in the monoclinic space group P2 1/c with a= ...