3-Nitro-N-(phenylsulphonyloxy)phthalimide (IIIa) and N-(phenylsulphonyloxy)phthalimide (IIIb) were synthesised as key intermediates in good yield. Their structures were confirmed by 1H NMR and FTIR spectral data. The reaction of the key intermediates with allylamine produced 3-allyl-5-nitroquinazoline-2,4-(1H,3H)-dione (IVa) and 3-allylquinazoline-2,4-(1H,3H)-dione (IVb), respectively. Luminescence emission and excitation spectra of IVa and IVb are also presented.