A wide range of novel 2-(β-D-ribofuranosyl)pyrimidines was synthesized by 3+3 cyclocondensation. Reaction of 6-arylamino-1,3-dialkyluracils with perfluorinated carboxylic acid anhydrides or chloroanhydrides and subsequent cyclization gave the corresponding 1,3-dialkyl-5-(polyfluoroalkyl)-5-deazaalloxazines. An unexpected recyclization in the series of spiro[indole-3,5'-pyrimido[4,5-b]quinoline]-2,2',4'-trione derivatives, carried out via a reaction between (thio)barbituric acids, isatins and electron-rich aromatic amines, was observed.