Water has been used efficiently as a solvent for the reaction of barbituric acid, aldehyde and urea or thiourea to yield pyrimido[4,5-d]pyrimidines. This environmentally benign procedure leads to high yields of products of greater purity in a single step using water.