1 N-Allyl(cinnamyl)substituted derivatives of 6methyluracil were synthesized. The reactions of their bromo-and iodocyclization were performed which led to the formation of the derivatives of dihydrooxazolopyrimidinium and dihydrooxazinepyrimidinium. The factors that favor the regioselectivity of these reactions were suggested.