Heating of 5-carbamoyl- (1) and 5-thiocarbamoyl-3-methyl-1-phenyluracil (5) derivatives in ethanolic sodium ethoxide causes a novel intramolecular rearrangement to give 5-anilinomethylenebarbituric acids(2) and 5-anilinomethylene-4-thiobarbituric and(6), respectively.