The reaction proceeds in the opposite direction. A step in riboflavin biosynthesis, NADPH and NADH function equally well as reductant. Differs from EC 1.1.1.193 (5-amino-6-(5-phosphoribosylamino)uracil reductase) since it does not catalyse the reduction of 5-amino-6-ribosylaminopyrimidine-2,4(1H,3H)-dione 5′-phosphate [1].