The carbodiimides 2, obtained from aza-Wittig reactions of iminophosphorane 1 with aromatic isocyanates, react with hydrazine to give, selectively, the 3-amino-2-arylaminoquinazolin-4(3H)-ones 4. Reaction of 4 with triphenylphosphane, hexachloroethane and triethylamine produces iminophosphoranes 5. A tandem aza-Wittig reaction of iminophosphorane 5 with isocyanate or acyl chloride generates the 1,2,4-triazolo[5,1-b]quinazolin-9(3H)-ones 7 or 9, respectively, in