An expedient method for the synthesis of 5,6-dihydrobenzo[h][1,2,4]triazolo[5,1-b]quinazolines by UV light has been developed.