N’,N’-Disubstituted (2-phenylamino)-, (2-methylamino)- and (2-benzylamino)benzohydrazides (1) are cyclized by in situ prepared 1,1’-oxalyldiimidazole to give 3-amino-2,3,4,5-tetrahydro-1H- 1,4-benzodiazepine-2,3,5-triones 2 as the major product. Depending on the substituents of 1 competitive formation of quinazoline-2,4-diones 3 and 1,3,4-oxadiazoline-2-one 4 is observed. The formation of heterocycles 2, 3, 4 is rationalized via a common primary intermediate 1A.